Android v21 Theme.Appcompat color accent is ignored, no padding on dialogs -


I am using actionbusiness activity from the Android 5 SDK and these are my topics X 21

But the colors are ignored, and they are replaced with the default tail color and all the dialogs appear without padding.

:

The padding problem was due to the fat system system and I was determined to use it.

But the pronunciation color problem is still there, and it does not affect the dialogue only, but the entire app

You are using an AppCompat theme for the color of accent so that you can let Android Remove from the namespace inside.

  & lt; Style name = "Aaptim_Lite" parent = "theme.AppCompat.Light.DarkActionBar" & gt; & Lt; Item name = "color primary" & gt; @ Color / abc1 & lt; / Item & gt; & Lt; Item name = "color primary dark" & gt; @color / abc2 & lt; / Item & gt; & Lt; Item name = "color clock" & gt; @ Color / abc3 & lt; / Item & gt; & Lt; / Style & gt;  

AppCompat does not support it about the dialog (as I know it).
You can try to use this style in your values-v21 folder:

  & lt; Style name = "theme" guardian = "framework arrow.im" & gt; & Lt; Item name = "Android: AlertDialogTheme" & gt; @Style / Theme.AltartyLog & lt; / Item & gt; & Lt; / Style & gt; & Lt; Style name = "theme.alertodyology" parent = "Android: theme. Lightweight dialogue. Alert" & gt; & Lt; Item name = "Android: Color primary" & gt; @color_demo_primary_color & lt; / Item & gt; & Lt; Item Name = "Android: Color Primary Dark" & gt; @color/demo_color primary dark & ​​lt; / Item & gt; & Lt; Item name = "android: colorAccent" & gt; @color / theme_accent_1 & lt; / Item & gt; & Lt; / Style & gt;  

Update 23/04/2015: Support Library v.22.1

New Support Library v22.1 Works with the dialog you can use one or the other.

For example:

  Import android.support.v7.app.AlertDialog AlertDialog.Builder builder = new AlertDialog.Builder (this, R.style.AppCompatAlertDialogStyle) ; Builder.setTitle ("dialog"); Builder. Sitemase ("Home Adams Dollar ...."); Builder. Setup Button ("OK", blank); Builder.button ("cancel", blank); Builder.show ();  

And use a style like this:

  & lt; Style name = "AppCompatAlertDialogStyle" original = "Theme.AppCompat.Light.Dialog.Alert"> & Lt; Item name = "color clock" & gt; #ffc0000 & lt; / Item & gt; & Lt; Item name = "android: textColorPrimary" & gt; #fffff & lt; / Item & gt; & Lt; Item name = "Android: Background" & gt; # 5fa3d0 & lt; / Item & gt; & Lt; / Style & gt;  

Otherwise, you can define your current theme:

  & lt; Style name = "Aaptim" Parent = "Theme. AppCompat.Light" & gt; & Lt ;! - Your style - & gt; & Lt; Item name = "Alert DIOL Ohtheme" & gt; @ Style / AppCompatAlertDialogStyle & lt; / Item & gt; & Lt; / Style & gt;  

And then in your code:

  Import android.support.v7.app.AlertDialog AlertDialog.Builder Builder = New AlertDialog.Builder (this) ;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -