2014-09-30 2 views
0

Я попытался изменить стиль своего многоканального счетчика. Я могу изменить фон spinner, но я не могу изменить цвет текста и фон кнопки. Вот мой код: styles.xmlИзменить стиль Spinner

<resources> 

<!-- Base application theme. --> 
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar"> 
    <item name="android:windowNoTitle">true</item> 
    <item name="android:alertDialogStyle">@style/CustomDialogTheme</item> 
    <item name="android:spinnerDropDownItemStyle">@style/CustomDialogTheme</item> 
    <item name="android:spinnerItemStyle">@style/CustomDialogTheme</item> 
    <item name="android:spinnerStyle">@style/CustomDialogTheme</item> 
</style> 
<style name="CustomDialogTheme" parent="@android:style/Theme.Dialog"> 
    <item name="android:bottomBright">@color/white</item> 
    <item name="android:bottomDark">@color/white</item> 
    <item name="android:bottomMedium">@color/white</item> 
    <item name="android:centerBright">@color/white</item> 
    <item name="android:centerDark">@color/white</item> 
    <item name="android:centerMedium">@color/white</item> 
    <item name="android:fullBright">@color/white</item> 
    <item name="android:fullDark">@color/white</item> 
    <item name="android:topBright">@color/white</item> 
    <item name="android:topDark">@color/white</item> 
    <item name="android:textColor">@color/blue</item> 
</style> 

А теперь, мой счетчик выглядит следующим образом: enter image description here

Я хочу изменить цвет текста (<item name="android:textColor">@color/blue</item> не работает) и фон кнопки и цвет флажка. Есть ли способ сделать это без определения собственного LayoutInflater (Why does LayoutInflater ignore the layout_width and layout_height layout parameters I've specified?) или создания подкласса адаптера массива (How to change font style for spinner item)?

ответ

0

Вы можете увидеть мои проекты github. Я думаю, это поможет вам слишком много.

Custom Spinner

Custome Checkbox

+0

хорошая идея, если вы предоставите скриншот для вашего проекта! – mmlooloo

Смежные вопросы