Code:
public class AnApp extends ListActivity {
/** Called when the activity is first created. */
static final String[] MAIN_MENU = new String[] {
"One", "Two", "Three"
};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, MAIN_MENU));
getListView().setTextFilterEnabled(true);
}
}
All I have done in my project is changed the AnApp class so it extends ListActivity (instead of Activity). Copy and pasted the onCreate method in the tutorial. Made a String called MAIN_MENU and replaced the COUNTRIES variable in the tutorial with MAIN_MENU.
My code is running with no errors or warnings, but no list appears, what could I be doing wrong?