So my app is almost done. I have Xperia Z1 which runs Android Lollipop and everything looks fine on it.
Today I sent APK file to my friend who have Xperia T which runs on Android 4.3
He said that everything runs perfect, except actionbar is not showing text or icons. It shows text and icons only on activities that have ListViews.
I don't even know what code to past here.. So if anyone could help I would be thankfull. And please write down what code do you want me to copy.
This is how activites look like:
public class BlaBlaBla extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_programi_specijalizacija_ruke);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
and styles
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="elevation">0dp</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="NavigationDrawerStyle">
<item name="android:textSize">14sp</item><!-- text size in menu-->
<item name="android:background">#f2f2f2</item>
<item name="android:listPreferredItemHeightSmall">36dp</item><!-- item size in menu-->
</style>
<style name="AppTheme.BrandedLaunch" parent="AppTheme">
<item name="android:windowBackground">#drawable/branded_logo</item>
</style>
<style name="Theme.MyApp.ActionBar" parent="style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">#null</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">#null</item>
</style>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light">
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">#null</item>
/>
</style>
<style name="FullscreenTheme" parent="AppTheme">
<item name="android:actionBarStyle">#style/FullscreenActionBarStyle</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:windowBackground">#null</item>
<item name="metaButtonBarStyle">?android:attr/buttonBarStyle</item>
<item name="metaButtonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
</style>
<style name="FullscreenActionBarStyle" parent="Widget.AppCompat.ActionBar">
<item name="android:background">#color/black_overlay</item>
</style>
</resources>
styles v21
<resources>>
<style name="AppTheme.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:elevation">0dp</item>
<item name="android:statusBarColor">#android:color/transparent</item>
</style>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">#null</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:navigationBarColor">#color/black</item>
</style>
</resources>
styles v19
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="elevation">0dp</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="NavigationDrawerStyle">
<item name="android:textSize">14sp</item><!-- text size in menu-->
<item name="android:background">#f2f2f2</item>
<item name="android:listPreferredItemHeightSmall">36dp</item><!-- item size in menu-->
</style>
<style name="AppTheme.BrandedLaunch" parent="AppTheme">
<item name="android:windowBackground">#drawable/branded_logo</item>
</style>
<style name="Theme.MyApp.ActionBar" parent="style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">#null</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">#null</item>
</style>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light">
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">#null</item>
/>
</style>
<style name="FullscreenTheme" parent="AppTheme">
<item name="android:actionBarStyle">#style/FullscreenActionBarStyle</item>
<item name="android:windowActionBarOverlay">true</item>
<item name="android:windowBackground">#null</item>
<item name="metaButtonBarStyle">?android:attr/buttonBarStyle</item>
<item name="metaButtonBarButtonStyle">?android:attr/buttonBarButtonStyle</item>
</style>
<style name="FullscreenActionBarStyle" parent="Widget.AppCompat.ActionBar">
<item name="android:background">#color/black_overlay</item>
</style>
</resources>
And in AndroidManifest all activities have this:
android:theme="#style/ThemeOverlay.AppCompat.ActionBar" />
Related
I am using the code below for changing actionbar size.
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:textAllCaps">false</item>
<item name="android:windowFullscreen">true</item>
<item name="actionBarSize">26.0dip</item>
</style>
Here is my result
Image
Why this margin exists on child?
iOS developer here thrown to the wolves of an Android project. I am getting a few error codes that all say something similar to ThemeUtils: View class androidx.appcompat.widget.AppCompatTextView is an AppCompat widget that can only be used with a Theme.AppCompat theme (or descendant). as soon as the following code snippet runs:
view = inflater.inflate(R.layout.f_basic_dashboard_screen, null, false)
My inflater is instantiated as follows:
val inflater: LayoutInflater = LayoutInflater.from(SqueaksApplication.getApplicationInstance())
SqueaksApplication.getApplicationInstance() just returns an instance of public class SqueaksApplication extends Application
Almost every answer I have found to this question points to the project's manifest as the issue and needing to provide a theme for the project. My project's manifest looks like the following:
<application
android:name=".SqueaksApplication"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"
tools:replace="android:icon,android:allowBackup">
As you can see my manifest already includes the line android:theme="#style/AppTheme"
My project uses the layout inflator in many different places, but this is the only one I have come across that is throwing errors. Would appreciate any insight, or solutions you may have, thanks!
Edit: As requested this is my styles.xml:
<style name="MainActivityTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:actionMenuTextColor">#FFF</item>
<item name="actionBarStyle">#style/MainActivityTheme.Toolbar</item>
<item name="actionBarTheme">#style/MainActivityTheme.ToolbarOverlay</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="toolbarStyle">#style/MainActivityTheme.Toolbar</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:textColorPrimary">#color/text_primary</item>
<item name="android:textColorSecondary">#color/text_secondary</item>
<item name="android:windowBackground">#color/background</item>
<item name="actionOverflowButtonStyle">#style/MainActivityTheme.ActionOverflow</item>
<item name="alertDialogTheme">#style/AlertDialogTheme</item>
</style>
<style name="AlertDialogTheme" parent="Base.Theme.AppCompat.Light.Dialog.Alert">
<item name="android:textColorPrimary">#DE000000</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="MainActivityTheme.ActionOverflow" parent="Base.Widget.AppCompat.ActionButton.Overflow">
<item name="android:src">#drawable/ic_settings</item>
</style>
<style name="MainActivityTheme.Toolbar" parent="Widget.AppCompat.ActionBar.Solid">
<item name="background">#color/colorPrimary</item>
<item name="elevation">4dp</item>
<item name="titleTextAppearance">#style/MainActivityTheme.ToolbarTextAppearance</item>
<item name="android:textColorPrimary">#android:color/white</item>
<item name="android:textColorSecondary">#android:color/white</item>
</style>
<style name="MainActivityTheme.ToolbarOverlay" parent="ThemeOverlay.AppCompat.ActionBar">
<item name="android:textColorPrimary">#android:color/white</item>
<item name="android:textColorSecondary">#android:color/white</item>
</style>
<style name="MainActivityTheme.ToolbarTextAppearance" parent="TextAppearance.AppCompat.Title">
<item name="android:textColor">#81be41</item>
<item name="android:textSize">16sp</item>
<item name="android:textStyle">bold</item>
</style>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:actionMenuTextColor">#FFF</item>
<item name="actionBarStyle">#style/Toolbar</item>
<item name="actionBarTheme">#style/ToolbarOverlay</item>
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="toolbarStyle">#style/Toolbar</item>
<item name="android:textColorPrimary">#color/text_primary</item>
<item name="android:textColorSecondary">#color/text_secondary</item>
<item name="android:windowBackground">#color/background</item>
<item name="actionOverflowButtonStyle">#style/ActionOverflow</item>
<item name="alertDialogTheme">#style/AlertDialogTheme</item>
</style>
<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="android:windowBackground">#color/colorPrimary</item>
<item name="colorAccent">#color/colorAccent</item>
</style>
<style name="ActionOverflow" parent="Base.Widget.AppCompat.ActionButton.Overflow">
<item name="android:src">#drawable/ic_dots_vertical_white</item>
</style>
<style name="Toolbar" parent="Widget.AppCompat.ActionBar.Solid">
<item name="background">#color/colorPrimary</item>
<item name="elevation">4dp</item>
<item name="titleTextAppearance">#style/ToolbarTextAppearance</item>
<item name="android:textColorPrimary">#android:color/white</item>
<item name="android:textColorSecondary">#android:color/white</item>
</style>
<style name="ToolbarOverlay" parent="ThemeOverlay.AppCompat.ActionBar">
<item name="android:textColorPrimary">#android:color/white</item>
<item name="android:textColorSecondary">#android:color/white</item>
</style>
<style name="ToolbarTextAppearance" parent="TextAppearance.AppCompat.Title">
<item name="android:textColor">#81be41</item>
<item name="android:textSize">20sp</item>
</style>
<style name="Splash" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">#drawable/background_splash</item>
</style>
<style name="squeak_item_popup_menu_animation">
<item name="android:windowEnterAnimation">#anim/squeak_item_popup_menu_animation_enter</item>
<item name="android:windowExitAnimation">#anim/squeak_item_popup_menu_animation_exit</item>
</style>
<style name="Theme.Transparent" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">#android:color/transparent</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
Your issue is the context used: val inflater: LayoutInflater = LayoutInflater.from(SqueaksApplication.getApplicationInstance()).
The ApplicationContext doesn't have your app theme.
You need to pass the Activity, not an Application Context.
Hi in my android studio project this is always red: #style/ThemeOverlay.AppCompat.Dark.ActionBar
and this:
#style/ThemeOverlay.AppCompat.Dark.ActionBar
I have tried everything but still now able to solve this. please help me
and by styles.xml is
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="colorControlNormal">#color/lightBorder</item>
</style>
<style name="deafultSpinner" parent="android:Widget.TextView.SpinnerItem">
<item name="android:padding">0dp</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<!-- new -->
<style name="logo_img">
<item name="android:src">#drawable/logo</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">#dimen/logo_width</item>
<item name="android:layout_height">#dimen/logo_height</item>
</style>
<style name="logo_tv">
<item name="android:layout_marginTop">25dp</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">#dimen/logo_text</item>
<item name="android:textColor">#android:color/black</item>
<item name="android:text">RhythmCor</item>
</style>
<style name="logo_img2">
<item name="android:layout_marginTop">50dp</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">#dimen/logo_width</item>
<item name="android:layout_height">#dimen/logo_height</item>
<item name="android:src">#drawable/logo</item>
</style>
<style name="logo_img3">
<item name="android:layout_marginTop">100dp</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">#dimen/logo_width</item>
<item name="android:layout_height">#dimen/logo_height</item>
<item name="android:src">#drawable/logo</item>
</style>
<style name="status_img">
<item name="android:layout_marginTop">100dp</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">#dimen/statusIcon_width</item>
<item name="android:layout_height">#dimen/statusIcon_height</item>
</style>
<style name="logo_tv2">
<item name="android:layout_marginTop">20dp</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">#dimen/screen_text</item>
<item name="android:textColor">#android:color/black</item>
</style>
<style name="logo_desc_tv">
<item name="android:layout_marginTop">25dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:textColor">#android:color/black</item>
<item name="android:textSize">#dimen/normal_text</item>
<item name="android:lineSpacingExtra">#dimen/small_line_spacing</item>
</style>
<style name="logo_desc_tv2">
<item name="android:layout_marginTop">40dp</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:textColor">#android:color/black</item>
<item name="android:textSize">#dimen/normal_text</item>
<item name="android:lineSpacingExtra">#dimen/small_line_spacing</item>
</style>
<style name="logo_desc_tv3">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:textColor">#android:color/black</item>
<item name="android:textSize">#dimen/small_text</item>
<item name="android:lineSpacingExtra">#dimen/small_line_spacing</item>
</style>
<style name="welcome_tv1">
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">#dimen/welcome_text1</item>
<item name="android:textColor">#android:color/white</item>
<item name="android:text">Welcome!</item>
</style>
<style name="welcome_tv2">
<item name="android:layout_marginTop">25dp</item>
<item name="android:layout_gravity">center_horizontal</item>
<item name="android:gravity">center_horizontal</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">#dimen/welcome_text2</item>
<item name="android:textColor">#android:color/white</item>
<item name="android:lineSpacingExtra">#dimen/normal_line_spacing</item>
<item name="android:text">Keep track of your health\nwith RhythmCor</item>
</style>
<style name="welcome_footer_btns">
<item name="android:background">#null</item>
<item name="android:textColor">#android:color/white</item>
<item name="android:layout_margin">10dp</item>
<item name="android:textSize">#dimen/welcome_btn_text</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="external_buttons">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">40dp</item>
<item name="android:layout_marginBottom">24dp</item>
<item name="android:textColor">#android:color/white</item>
<item name="android:background">#color/colorPrimary</item>
<item name="android:padding">12dp</item>
</style>
<style name="external_buttons1">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">-10dp</item>
<item name="android:layout_marginBottom">20dp</item>
<item name="android:textColor">#android:color/black</item>
<item name="android:background">#null</item>
<item name="android:padding">12dp</item>
</style>
<style name="external_buttons2">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_marginTop">40dp</item>
<item name="android:layout_marginBottom">40dp</item>
<item name="android:textColor">#android:color/white</item>
<item name="android:background">#color/colorPrimary</item>
<item name="android:padding">12dp</item>
</style>
</resources>
and my dependencies in build.gradle is:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
testCompile 'junit:junit:4.12'
}
I only had to update my android studio and it worked!
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Toolbar style -->
<item name="toolbarStyle">#style/MyToolBarStyle</item>
<!-- Spinner style -->
<item name="spinnerStyle">#style/MySpinner</item>
<!-- colorPrimary is used for the default action bar background -->
<item name="colorPrimary">#color/colorPrimary</item>
<!-- colorPrimaryDark is used for the status bar -->
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<!--
colorAccent is used as the default value for colorControlActivated,
which is used to tint widgets -->
<item name="colorAccent">#color/colorAccent</item>
</style>
Use this #style/Theme.AppCompat.Light.DarkActionBar replace of #style/ThemeOverlay.AppCompat.Dark.ActionBar in xml coding.
I have read several threads on this topic and have implemented the below code. However, I cannot change change the text color of my Action Bar text:
<style name="AppTheme.NoActionBar">
<item name="android:statusBarColor">#android:color/white</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:textColor">#color/white</item>
<item name="android:actionBarStyle">#style/MyTheme.ActionBarStyle</item>
</style>
<style name="MyTheme.ActionBarStyle" parent="#style/Widget.AppCompat.Light.ActionBar">
<item name="android:titleTextStyle">#style/MyTheme.ActionBar.TitleTextStyle</item>
</style>
<style name="MyTheme.ActionBar.TitleTextStyle" parent="#style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">#color/white</item>
</style>
<style name="AppThemeLight" parent="Theme.AppCompat.Light.DarkActionBar">
...
<item name="android:textColorPrimary">#color/yourColor</item>
</style>
I use Toolbar and this works for me. Too bad i couldn't repeat it with inheritance.
I recently migrated from Eclipse to Android Studio. Now my customized theme is not appied anymore to devices below API21. Not completely sure but I think I changed nothing in my styles while migrating.
What I have is:
(don't wonder about the duplicates, I have two user-selectable themes)
themes.xml:
<?xml version="1.0" encoding="utf-8"?>
<style name="AppTheme" parent="Theme.AppCompat.Light">
<item name="colorPrimary">#color/theme_color</item>
<item name="colorPrimaryDark">#color/theme_color_dark</item>
<item name="colorAccent">#color/theme_color_accent</item>
<item name="android:editTextStyle">#style/EditTextTheme</item>
<item name="android:textColorHighlight">#99335a9d</item>
<item name="android:autoCompleteTextViewStyle">#style/AutoCompleteTextViewTheme</item>
<item name="android:checkboxStyle">#style/CheckBoxTheme</item>
<item name="android:radioButtonStyle">#style/RadioButtonTheme</item>
<item name="android:buttonStyle">#style/ButtonTheme</item>
<item name="android:imageButtonStyle">#style/ImageButtonTheme</item>
<item name="android:spinnerStyle">#style/SpinnerTheme</item>
<item name="android:spinnerDropDownItemStyle">#style/SpinnerDropDownItemTheme</item>
<item name="android:progressBarStyleHorizontal">#style/ProgressBarTheme</item>
<item name="android:seekBarStyle">#style/SeekBarTheme</item>
<item name="android:buttonStyleToggle">#style/ToggleTheme</item>
<item name="android:listViewStyle">#style/ListViewTheme</item>
<item name="android:spinnerItemStyle">#style/SpinnerItemTheme</item>
<item name="android:alertDialogTheme">#style/AlertDialog</item>
</style>
<style name="AppThemeDark" parent="Theme.AppCompat">
<item name="colorPrimary">#color/theme_color</item>
<item name="colorPrimaryDark">#color/theme_color_dark</item>
<item name="colorAccent">#color/theme_color_accent</item>
<item name="android:editTextStyle">#style/EditTextTheme</item>
<item name="android:textColorHighlight">#99335a9d</item>
<item name="android:autoCompleteTextViewStyle">#style/AutoCompleteTextViewTheme</item>
<item name="android:checkboxStyle">#style/CheckBoxTheme</item>
<item name="android:radioButtonStyle">#style/RadioButtonTheme</item>
<item name="android:buttonStyle">#style/ButtonThemeDark</item>
<item name="android:imageButtonStyle">#style/ImageButtonTheme</item>
<item name="android:spinnerStyle">#style/SpinnerTheme</item>
<item name="android:spinnerDropDownItemStyle">#style/SpinnerDropDownItemTheme</item>
<item name="android:progressBarStyleHorizontal">#style/ProgressBarTheme</item>
<item name="android:seekBarStyle">#style/SeekBarTheme</item>
<item name="android:buttonStyleToggle">#style/ToggleTheme</item>
<item name="android:listViewStyle">#style/ListViewTheme</item>
<item name="android:spinnerItemStyle">#style/SpinnerItemTheme</item>
<item name="android:alertDialogTheme">#style/AlertDialogDark</item>
</style>
styles.xml
<?xml version="1.0" encoding="utf-8"?>
<style name="EditTextTheme" parent="android:Widget.EditText">
<item name="android:background">#drawable/theme_edit_text_holo_light</item>
</style>
<style name="AutoCompleteTextViewTheme" parent="android:Widget.AutoCompleteTextView"></style>
<style name="CheckBoxTheme" parent="android:Widget.CompoundButton.CheckBox">
<item name="android:button">#drawable/theme_btn_check_holo_light</item>
</style>
<style name="RadioButtonTheme" parent="android:Widget.CompoundButton.RadioButton">
<item name="android:button">#drawable/theme_btn_radio_holo_light</item>
</style>
<style name="ButtonTheme" parent="android:Widget.Button">
<item name="android:background">#drawable/theme_btn_default_holo_light</item>
<item name="android:minHeight">48dip</item>
<item name="android:minWidth">64dip</item>
</style>
<style name="ButtonThemeDark" parent="android:Widget.Button">
<item name="android:background">#drawable/theme_btn_default_holo_light</item>
<item name="android:minHeight">48dip</item>
<item name="android:minWidth">64dip</item>
<item name="android:textColor">#color/white_color</item>
</style>
<style name="ImageButtonTheme" parent="android:Widget.ImageButton">
<item name="android:background">#drawable/theme_btn_default_holo_light</item>
</style>
<style name="SpinnerTheme" parent="android:Widget.Spinner">
<item name="android:background">#drawable/theme_spinner_background_holo_light</item>
<item name="android:dropDownSelector">#drawable/theme_list_selector_holo_light</item>
</style>
<style name="SpinnerDropDownItemTheme" parent="android:Widget.DropDownItem.Spinner">
<item name="android:checkMark">#drawable/theme_btn_radio_holo_light</item>
</style>
<style name="TabTheme">
<item name="android:gravity">center_horizontal</item>
<item name="android:paddingLeft">16dip</item>
<item name="android:paddingRight">16dip</item>
<item name="android:background">#drawable/theme_tab_indicator_holo</item>
<item name="android:layout_width">0dip</item>
<item name="android:layout_weight">1</item>
<item name="android:minWidth">80dip</item>
</style>
<style name="TabTextTheme">
<item name="android:textSize">12sp</item>
<item name="android:textStyle">bold</item>
<!-- v14 <item name="android:textAllCaps">true</item> -->
<item name="android:ellipsize">marquee</item>
<item name="android:maxLines">2</item>
<item name="android:maxWidth">180dip</item>
</style>
<style name="ProgressBarTheme" parent="android:Widget.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/theme_progress_horizontal_holo_light
</item>
<item name="android:indeterminateDrawable">
#drawable/theme_progress_indeterminate_horizontal_holo_light
</item>
<item name="android:minHeight">16dip</item>
<item name="android:maxHeight">16dip</item>
</style>
<style name="SeekBarTheme" parent="android:Widget.SeekBar">
<item name="android:progressDrawable">
#drawable/theme_scrubber_progress_horizontal_holo_light
</item>
<item name="android:indeterminateDrawable">
#drawable/theme_scrubber_progress_horizontal_holo_light
</item>
<item name="android:minHeight">13dip</item>
<item name="android:maxHeight">13dip</item>
<item name="android:thumb">#drawable/theme_scrubber_control_selector_holo_light</item>
<item name="android:thumbOffset">16dip</item>
<item name="android:paddingLeft">16dip</item>
<item name="android:paddingRight">16dip</item>
</style>
<style name="ToggleTheme" parent="android:Widget.Button.Toggle">
<item name="android:background">#drawable/theme_btn_toggle_holo_light</item>
<item name="android:minHeight">48dip</item>
</style>
<style name="ListViewTheme" parent="android:Widget.ListView">
<item name="android:listSelector">#drawable/theme_list_selector_holo_light</item>
</style>
<style name="SpinnerItemTheme" parent="android:TextAppearance.Widget.TextView.SpinnerItem"></style>
<style name="SwitchStyle">
<item name="android:thumb">#drawable/theme_switch_inner_holo_light</item>
<item name="android:track">#drawable/theme_switch_track_holo_light</item>
</style>
<style name="AlertDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="colorPrimary">#color/theme_color</item>
<item name="colorAccent">#color/theme_color_accent</item>
<item name="colorPrimaryDark">#color/theme_color_dark</item>
<item name="android:windowTitleStyle">#style/Title</item>
<item name="android:divider">#null</item>
<item name="android:windowBackground">#android:color/transparent</item>
</style>
<style name="AlertDialogDark" parent="Theme.AppCompat.Dialog">
<item name="colorPrimary">#color/theme_color</item>
<item name="colorAccent">#color/theme_color_accent</item>
<item name="colorPrimaryDark">#color/theme_color_dark</item>
<item name="android:windowTitleStyle">#style/Title</item>
<item name="android:windowBackground">#android:color/transparent</item>
<item name="android:divider">#null</item>
</style>
<style name="Title" parent="Theme.AppCompat.Dialog">
<item name="android:textColor">#color/theme_color</item>
<item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
</style>
<!-- used for enhanced list view-->
<style name="elv_fade_animation">
<item name="#android:windowEnterAnimation">#anim/elv_popup_show</item>
<item name="#android:windowExitAnimation">#anim/elv_popup_hide</item>
</style>
<!-- custom progress dialog -->
<style name="CustomProgressDialog" parent="Theme.AppCompat.Dialog">
<item name="android:windowFrame">#null</item>
<item name="android:windowBackground">#android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:windowTitleStyle">#null</item>
<item name="android:windowAnimationStyle">#android:style/Animation.Dialog</item>
<item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
v21/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<style name="EditTextTheme" parent="android:Widget.Material.EditText">
<item name="android:background">#drawable/theme_edit_text_holo_light</item>
</style>
<style name="AutoCompleteTextViewTheme" parent="android:Widget.Material.AutoCompleteTextView"></style>
<style name="CheckBoxTheme" parent="android:Widget.Material.CompoundButton.CheckBox">
<item name="android:button">#drawable/theme_btn_check_holo_light</item>
</style>
<style name="RadioButtonTheme" parent="android:Widget.Material.CompoundButton.RadioButton">
<item name="android:button">#drawable/theme_btn_radio_holo_light</item>
</style>
<style name="ButtonTheme" parent="android:Widget.Material.Button">
<item name="android:background">#drawable/theme_btn_default_holo_light</item>
<item name="android:minHeight">48dip</item>
<item name="android:minWidth">64dip</item>
</style>
<style name="ButtonThemeDark" parent="android:Widget.Material.Button">
<item name="android:background">#drawable/theme_btn_default_holo_light</item>
<item name="android:minHeight">48dip</item>
<item name="android:minWidth">64dip</item>
<item name="android:textColor">#color/white_color</item>
</style>
<style name="ImageButtonTheme" parent="android:Widget.Material.ImageButton">
<item name="android:background">#drawable/theme_btn_default_holo_light</item>
</style>
<style name="SpinnerTheme" parent="android:Widget.Material.Spinner">
<item name="android:background">#drawable/theme_spinner_background_holo_light</item>
<item name="android:dropDownSelector">#drawable/theme_list_selector_holo_light</item>
</style>
<style name="SpinnerDropDownItemTheme" parent="android:Widget.Material.DropDownItem.Spinner">
<item name="android:checkMark">#drawable/theme_btn_radio_holo_light</item>
</style>
<style name="TabTheme">
<item name="android:gravity">center_horizontal</item>
<item name="android:paddingLeft">16dip</item>
<item name="android:paddingRight">16dip</item>
<item name="android:background">#drawable/theme_tab_indicator_holo</item>
<item name="android:layout_width">0dip</item>
<item name="android:layout_weight">1</item>
<item name="android:minWidth">80dip</item>
</style>
<style name="TabTextTheme">
<item name="android:textSize">12sp</item>
<item name="android:textStyle">bold</item>
<item name="android:textAllCaps">true</item>
<item name="android:ellipsize">marquee</item>
<item name="android:maxLines">2</item>
<item name="android:maxWidth">180dip</item>
</style>
<style name="ProgressBarTheme" parent="android:Widget.Material.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/theme_progress_horizontal_holo_light</item>
<item name="android:indeterminateDrawable">#drawable/theme_progress_indeterminate_horizontal_holo_light</item>
<item name="android:minHeight">16dip</item>
<item name="android:maxHeight">16dip</item>
</style>
<style name="SeekBarTheme" parent="android:Widget.Material.SeekBar">
<item name="android:progressDrawable">#drawable/theme_scrubber_progress_horizontal_holo_light</item>
<item name="android:indeterminateDrawable">#drawable/theme_scrubber_progress_horizontal_holo_light</item>
<item name="android:minHeight">13dip</item>
<item name="android:maxHeight">13dip</item>
<item name="android:thumb">#drawable/theme_scrubber_control_selector_holo_light</item>
<item name="android:thumbOffset">16dip</item>
<item name="android:paddingLeft">16dip</item>
<item name="android:paddingRight">16dip</item>
</style>
<style name="ToggleTheme" parent="android:Widget.Material.Button.Toggle">
<item name="android:background">#drawable/theme_btn_toggle_holo_light</item>
<item name="android:minHeight">48dip</item>
</style>
<style name="ListViewTheme" parent="android:Widget.Material.ListView">
<item name="android:listSelector">#drawable/theme_list_selector_holo_light</item>
</style>
<style name="SpinnerItemTheme" parent="android:TextAppearance.Widget.TextView.SpinnerItem"></style>
<style name="SwitchStyle">
<item name="android:thumb">#drawable/theme_switch_inner_holo_light</item>
<item name="android:track">#drawable/theme_switch_track_holo_light</item>
</style>
<style name="AlertDialog" parent="Theme.AppCompat.Light.Dialog">
<item name="colorPrimaryDark">#color/theme_color_dark</item>
<item name="android:windowTitleStyle">#style/Title</item>
<item name="android:divider">#null</item>
</style>
<style name="AlertDialogDark" parent="Theme.AppCompat.Dialog">
<item name="colorPrimary">#color/theme_color</item>
<item name="colorAccent">#color/theme_color_accent</item>
<item name="colorPrimaryDark">#color/theme_color_dark</item>
<item name="android:windowTitleStyle">#style/Title</item>
<item name="android:divider">#null</item>
</style>
<style name="Title" parent="Theme.AppCompat.Dialog">
<item name="android:textColor">#color/theme_color</item>
<item name="android:textAppearance">?android:attr/textAppearanceLarge</item>
</style>
The links to #drawable are actual drawables created with http://android-holo-colors.com
If you find anything else (bad style or sth.) let me know as well. I'm quite new to android.
Since you are using Theme.AppCompat you don't have to include the android: prefix in your items name. Also you can checkout this question here and this if you want to read more about it