populateUIAccountList(listItems);
// Only enable "OK" button if something has been selected.
- mOkButton = (Button) findViewById(android.R.id.button2);
+ mOkButton = findViewById(android.R.id.button2);
mOkButton.setEnabled(mSelectedItemIndex != SELECTED_ITEM_NONE);
}
* If not specified then makes the description invisible.
*/
private void overrideDescriptionIfSupplied(String descriptionOverride) {
- TextView descriptionView = (TextView) findViewById(R.id.description);
+ TextView descriptionView = findViewById(R.id.description);
if (!TextUtils.isEmpty(descriptionOverride)) {
descriptionView.setText(descriptionOverride);
} else {
* based on {@code mSelectedItemIndex} member variable.
*/
private final void populateUIAccountList(String[] listItems) {
- ListView list = (ListView) findViewById(android.R.id.list);
+ ListView list = findViewById(android.R.id.list);
list.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_single_choice, listItems));
list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);