Search code examples
androidlayoutuser-interfacestyles

No Resource Found When Import Style ?attr/spinnerDropDownItemStyle in Android


when I try to import the style in my layout for LinearLayout, I always got the error alert "no resource found matches the given name ..." from Eclipse. Is there something wrong with the way that I import the style attribute "?attr/spinnerDropDownItemStyle"? Wait for the clue!

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="?attr/spinnerDropDownItemStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
</LinearLayout>

Solution

  • You want to use android's spinnerDropDownItemStyle. Use it this way..

    style="?android:attr/spinnerDropDownItemStyle"