Possible overdraw: Root element paints background

To optimize your apps performance (avoid overdraw), you can do the following: declare a theme in res/values/styles.xml <style name=”MyTheme” parent=”android:Theme”> <item name=”android:background”>@drawable/main</item> <item name=”android:windowNoTitle”>true</item> <item name=”android:windowFullscreen”>true</item> </style> change the Manifest: <application android:icon=”@drawable/ic_logo” android:label=”@string/app_name” android:theme=”@style/MyTheme” > remove the background declaration in “My xml”

Implementing user choice of theme

I actually have this feature in my application and additionally, I allow users to change theme at runtime. As reading a value from preferences takes some time, I’m getting a theme id via globally accessible function which holds cached value. As already pointed out – create some Android themes, using this guide. You will have … Read more

AlertDialog styling – how to change style (color) of title, message, etc

You need to define a Theme for your AlertDialog and reference it in your Activity’s theme. The attribute is alertDialogTheme and not alertDialogStyle. Like this: <style name=”Theme.YourTheme” parent=”@android:style/Theme.Holo”> … <item name=”android:alertDialogTheme”>@style/YourAlertDialogTheme</item> </style> <style name=”YourAlertDialogTheme”> <item name=”android:windowBackground”>@android:color/transparent</item> <item name=”android:windowContentOverlay”>@null</item> <item name=”android:windowIsFloating”>true</item> <item name=”android:windowAnimationStyle”>@android:style/Animation.Dialog</item> <item name=”android:windowMinWidthMajor”>@android:dimen/dialog_min_width_major</item> <item name=”android:windowMinWidthMinor”>@android:dimen/dialog_min_width_minor</item> <item name=”android:windowTitleStyle”>…</item> <item name=”android:textAppearanceMedium”>…</item> <item name=”android:borderlessButtonStyle”>…</item> <item name=”android:buttonBarStyle”>…</item> </style> … Read more