As im new, i'm obviously trying to learn and figure everything out still..
I'm simply trying to update a listview...
I created ListView01 on my main.xml .
Then using various examples, i have the following code..
I'm not exactly sure how to reference my main.xml layout? What am I doing wrong?
Thanks!!
I'm simply trying to update a listview...
I created ListView01 on my main.xml .
Then using various examples, i have the following code..
Code:
public class UItestAct extends ListActivity {
/** Called when the activity is first created. */
static final String[] COUNTRIES = new String[] {
"Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra"};
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ListView myListView = (ListView)findViewById(R.id.ListView01);
ArrayAdapter<String> myAdaptor = new ArrayAdapter<String>(this,R.layout.main,COUNTRIES);
myListView.setAdapter(myAdaptor);
//setListAdapter(myAdaptor);
// getListView().setTextFilterEnabled(true);
}
}
I'm not exactly sure how to reference my main.xml layout? What am I doing wrong?
Thanks!!