1

Android: Apply different themes to fragments of one activity

view story
linux-howto

http://stackoverflow.com – What I want to do: I want each Fragment of my MainActivity to use a different theme, so that the ActionBar has different background-colors, depending on the visible Fragment. The Situation: I created a MainActivity which uses the Tabs + Swipe Navigation. I Added 7 Tabs (=7 Fragments). I created one Theme which should be applied only to the first Fragment (fragment_main_1). Here the Theme: <resources xmlns:android="http://schemas.android.com/apk/res/android"> <style name="Blue" parent="android:Theme.Holo.Light"> <item name="android:actionBarStyle">@style/Blue.ActionBa (HowTos)