KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In all the examples I've seen they just use "android.R.layout.simple_list_item_1" when creating an ArrayAdapter. What is android.R.layout.simple_list_item_1,Is it just the name of a layout file called simple_list_item_1.xml or is it the id of the TextView required for the array adapter? How do I see the content of the file or use my own file from my res folder? public class MyClass extends ListActivity { private String[] titles = {"Test"}; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mylayout); setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, titles)); updateList(); } }
Tags (comma-separated)
Save Edits
Cancel