Saturday, 15 June 2013

Android style and theme -



Android style and theme -

i developing android app, , set minsdk 11 , targetsdk 18. when app runs on android 4.0.3 device, looks running on pre-ics. why?

i mean edittext(s) , other ui elements have non-holo theme. please consider next images. see in design should viewed same in run-time:

but see in device (4.0.3):

manifest , style (sections has dependncy issue)

<uses-sdk android:minsdkversion="11" android:targetsdkversion="18" /> <style name="appbasetheme" parent="android:theme.holo.light"> <!-- api 11 theme customizations can go here. --> </style> <style name="appbasetheme" parent="android:theme.holo.light.darkactionbar"> <!-- api 14 theme customizations can go here. --> </style> <style name="appbasetheme" parent="android:theme.light"> <!-- theme customizations available in newer api levels can go in res/values-vxx/styles.xml, while customizations related backward-compatibility can go here. --> </style> <!-- application theme. --> <style name="apptheme" parent="appbasetheme"> <!-- customizations not specific particular api-level can go here. --> </style>

according android developers theme of views compatible according minimum sdk version.

actually in graphical layout in eclipse not rendered minimum sdk version. when u comes real device compatibility comes.

the solution utilize own themes each views or can go this..

check holo colors or theme generator.

android android-theme

No comments:

Post a Comment