Welcome to the InfuseFactory wiki!
public class MainActivity extends InfuseActivity { private static final String TAG = "MAIN_ACTIVITY"; @BindAdapter(TestListAdapter.class) @BindOnItemClick(ListListener.class) @InfuseView(R.id.listView1) private ListView mListView; @BindOnClick(value = HideListener.class, id = R.id.buttonHide) private Button mHide; @InfuseView(R.id.textView1) private TextView mHelloWorld; @InfuseView(R.id.editText1) private EditText mText; @BindOnClick(value = GetTextListener.class, id = R.id.buttonText) private Button mGetText; // Infuse other utils that are used globally by the application @Infuse private DatabaseAdapter mDbAdapter; @Infuse private NetworkingAdapter mNetAdapter; @Infuse private PreferencesAdapter mPrefAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.d(TAG, "onCreate()"); } @Override public void onContentChanged() { super.onContentChanged(); Log.d(TAG, "onContentChanged"); mHelloWorld.setText("Goodbye world!"); } }
@BindAdapter(TestListAdapter.class) @BindOnItemClick(ListListener.class) @InfuseView(R.id.listView1) private ListView mListView; @BindOnClick(value = HideListener.class, id = R.id.buttonHide) private Button mHide; @InfuseView(R.id.textView1) private TextView mHelloWorld; @InfuseView(R.id.editText1) private EditText mText; @BindOnClick(value = GetTextListener.class, id = R.id.buttonText) private Button mGetText; // Infuse other utils that are used globally by the application @Infuse private DatabaseAdapter mDbAdapter; @Infuse private NetworkingAdapter mNetAdapter; @Infuse private PreferencesAdapter mPrefAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.d(TAG, "onCreate()"); } @Override public void onContentChanged() { super.onContentChanged(); Log.d(TAG, "onContentChanged"); mHelloWorld.setText("Goodbye world!"); }
}
There was an error while loading. Please reload this page.