Arun
Arun

Reputation: 3077

Using listItemFirstLineStyle in my own layout

I'm trying to create a custom ListView layout similar to android.R.layout.simple_list_item_2. However, when I use the following in my XML I get an error saying "No resource found matching the given name ?android:attr/listItemFirstLineStyle".

<TextView
    android:id="@+id/text1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    style="?android:attr/listItemFirstLineStyle" />

Can someone tell me how to rectify this or how to find the style properties so that I could copy them. I'm using Android 2.2.

Upvotes: 3

Views: 1757

Answers (1)

Arun
Arun

Reputation: 3077

Found the problem - android:attr/listItemFirstLineStyle was for an old version of the SDK I guess. For 2.0 and above - use android:attr/textAppearanceLarge NOT android:attr/listItemFirstLineStyle

http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/res/res/layout/simple_list_item_2.xml

Upvotes: 4

Related Questions