How to make custom windowBackground theme style work on all Android devices? -


I am trying to make all my activities a custom theme style that should look like this: < P> good

This theme works on many devices, including Nexus 7, Samsung Galaxy S4, and Samsung Dodge Charge (Gingerbread is running) However, on other devices, such as HP slate 7 and Motorola Diarrhea Razor, it ends in appearance like this:

 bad

I have the following in my AndroidManifest.xml in the application tag:

  Android: Theme = "@ Style / Aaptim"   

topic res / values ​​/ styles.xml occurs in:

  & lt; Style name = "appbashtheme" parent = "@ Android: style / theme.light.field Bayer" & gt; & Lt; / Style & gt; & Lt; Style name = "Aaptim" parent = "@ style / appbashtheme" & gt; & Lt; Item name = "android: windowBackground" & gt; @color / background & lt; / Item & gt; & Lt; / Style & gt;   

I've also added res / values-v11 under styles.xml . Here's the style applied:

  & lt; Style name = "appbashtheme" parent = "@ Android: style / theme. Hollow. Lightweight .actionbar" & gt; & Lt; / Style & gt;   

Finally, it appears under styles.xml under res / values-v14 :

  & lt; Style name = "appbashtheme" parent = "@ Android: style / theme.device default.lite" & gt; & Lt; / Style & gt;   

I define the subject for each activity and manually use the onCreate () in the setTheme () function Have tried, but nothing has worked, I have tried to manually set the background in every activity , and it does not work either to fix my problem. What can i do

EDIT: Setting > in styles, it works, but then those elements should not be received in the background. Color is also fine.

The key to solving the problem is android: windowBackground in the theme below:

  & lt; Item name = "android: windowBackground" & gt; @drawable / default_background & lt; / Item & gt;   

Note that I am no longer using @color , but only one @ drauble for which XML is below

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Size xmlns: Android = "http://schemas.android.com/apk/res/android" Android: Shape = "Rectangle" & gt; & Lt; Solid Android: Color = "@color / background" /> & Lt; / Size & gt;   

It seems that some devices do not support accepting colors for this element.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -