-
Notifications
You must be signed in to change notification settings - Fork 2
View Binding
Steven Lewi edited this page Jul 13, 2015
·
3 revisions
@ViewId
can be used to bind any kind of view into variable. It has same functionality as findViewById().
@ContentView(R.layout.activity_main)
public class MainActivity extends BaseActivity {
@ViewId(R.id.title)
private TextView title;
@ViewId(R.id.message)
private EditText message;
@Override
protected void onContentViewCreated() {
// Access view without initialization using findViewById()
title.setText("Send message:");
}
}