I want to change the theme of a specific activity in android. I have an application theme that is set, but want to set a specific theme for a specific activity. I cannot do it in the onCreate() with the way the application has been developed, and would like to do it in the view.xml file by doing android:theme="DarkTheme". However, this does not work, does anyone know a work around?
Asked
Active
Viewed 89 times
2 Answers
1
You can simply specify it for the activity you want in your manifest file. So for example
<activity
android:theme="@style/THE_THEME_YOU_WANT">
</activity>

Charles Li
- 1,835
- 3
- 24
- 40
-
It is not an activity. Simply a View.java file, that extends FrameLayout. I return that object and I do a addView(view). – Kunal Patel Jun 30 '16 at 16:36
1
Try change theme of activity you want in AndroidManifest.xml
<activity
android:name=".YourActivity"
android:label="@string/title_your_activity"
android:theme="@style/YourTheme">
</activity>

Fuyuba
- 191
- 1
- 8