tags:

views:

22

answers:

1

Let me explain with example... Consider 'android.R.layout.simple_list_item_multiple_choice'. It used to create multi-select lists. But the only definitions I found:

/platform/frameworks/base/core/res/res/values/public.xml:

<public type="layout" name="simple_list_item_multiple_choice" id="0x01090010" />

/platform/frameworks/base/api/current.xml:

<field name="simple_list_item_multiple_choice"
 type="int"
 transient="false"
 volatile="false"
 value="17367056"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>

But where is actual layout defined? When multi-select list created I see checkbox, where it comes from?

+2  A: 

Look in $ANDROID_HOME/platforms/$YOUR_PLATFORM/data/res/layout/simple_list_item_multiple_choice.xml, where $ANDROID_HOME is wherever you installed your SDK and $YOUR_PLATFORM is whatever platform version you are interested in (e.g., android-2.1).

For example, for Android 2.1, the layout is:

<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/text1"
    android:layout_width="fill_parent"
    android:layout_height="?android:attr/listPreferredItemHeight"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:gravity="center_vertical"
    android:checkMark="?android:attr/listChoiceIndicatorMultiple"
    android:paddingLeft="6dip"
    android:paddingRight="6dip"
/>
CommonsWare
Thank you! I missed it
alex2k8