Could you tell me where I can find specification of simple_item_list_1 or simple_item_list_2? Or tell me how to use them both?
views:
17answers:
1
A:
You can find these resources, and others, in your SDK. They are in $ANDROID_SDK/platforms/$VERSION/data/res
, where $ANDROID_SDK
is where you unpacked the SDK on your machine, and $VERSION
is some Android version (e.g., android-8
for Android 2.2).
CommonsWare
2010-09-02 16:00:12
Okay. I can read source of this XML files, but I still don't know, what object I have to give to contructor of ArrayAdapter, when I use simple_list_item_2. For example, for simple_list_item_1, constructor of ArrayAdapter looks like this: new ArrayAdapter(this, android.R.layout.simple_list_item_1, new String[] {"Car", "Cat"});
kspacja
2010-09-02 19:45:27
@kspacja: `ArrayAdapter` doesn't support `simple_list_item_2`. Here is a sample project showing the user of `simple_list_item_1`: http://github.com/commonsguy/cw-android/tree/master/Selection/List/
CommonsWare
2010-09-02 20:14:17
How to do this with simple_list_item_1 I know. How do I know, that ArrayAdapter doesn't support simple_list_item_2? How do I know what support what?
kspacja
2010-09-02 20:38:33