Customising Spinner Popup Lists (horizontalDivider)

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Customising Spinner Popup Lists (horizontalDivider)

Postby nilz » Thu Dec 17, 2009 4:58 pm

Hi,

I'm having trouble changing the drawable resource used to draw the horizontal divider in the spinners popup list.

If I do the following in styles.xml, I am able to change every part of the popup list except the horizontal divider graphic. I'm even able to change the divider height!

<resources>
<style name="MyTheme">
<item name="android:spinnerDropDownItemStyle">@style/Widget.DropDownItem.Spinner</item>
<item name="android:listViewStyle">@style/Widget.ListView</item>
<item name="android:alertDialogStyle">@style/AlertDialog</item>
</style>


<style name="Widget.DropDownItem.Spinner" parent="@android:style/Widget.DropDownItem.Spinner">
<item name="android:checkMark">@drawable/radio_button</item>
<item name="android:textStyle">bold</item>
<item name="android:textColor">@color/white</item>
</style>

<style name="Widget.ListView" parent="android:Widget.ListView">
<item name="android:listSelector">@drawable/my_list_selector_background</item>
<item name="android:horizontalDivider">@drawable/my_divider</item>
<item name="android:dividerHeight">10dip</item>
</style>

<style name="AlertDialog" parent="@android:style/AlertDialog">
<item name="android:topDark">@drawable/my_popup_top_dark</item>
<item name="android:bottomBright">@drawable/my_popup_bottom_dark</item>
</style>
</resources>

No matter what I try I can't stop it from using the default in-built divider graphic.

Does anyone know how to change the horizontal divider graphic specific to the spinner widgets popup list?

Cheers,
Nilz.
nilz
Freshman
Freshman
 
Posts: 2
Joined: Mon Jun 01, 2009 7:17 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests