Created
October 3, 2018 04:29
-
-
Save randallmitchell/542cc6ae8cbb1fea5c63d2ffc57abd68 to your computer and use it in GitHub Desktop.
Setting the theme for spinners when using an AppCompat theme.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.NoActionBar"> | |
<item name="spinnerStyle">@style/Spinner</item> | |
<item name="android:spinnerItemStyle">@style/Spinner.Item</item> | |
<item name="spinnerDropDownItemStyle">@style/Spinner.Dropdown</item> | |
</style> | |
<!-- styling for the main widget --> | |
<style name="Spinner" parent="@style/Widget.AppCompat.Spinner"> | |
<item name="android:background">@drawable/spinner_background</item> | |
</style> | |
<!-- styling for the text inside the main widget (includes padding, font, etc.) --> | |
<style name="Spinner.Item" parent="@style/Widget.AppCompat.TextView.SpinnerItem"> | |
<item name="android:textColor">@color/text_color</item> | |
<item name="android:textSize">16sp</item> | |
<item name="android:fontFamily">@font/main_data_entry_font</item> | |
</style> | |
<!-- styling for drop down items --> | |
<style name="Spinner.Dropdown" parent="@style/Widget.AppCompat.Spinner.DropDown"> | |
<item name="android:textColor">@color/text_color</item> | |
<item name="android:textSize">16sp</item> | |
<item name="android:fontFamily">@font/main_data_entry_font</item> | |
</style> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment