Reputation: 2563
I like to use dark theme in my activity, but I would like to have drawer in light theme.
Is it possible to set dark theme for activity AND light for drawer? Drawer should be light, but within dark activity.
Upvotes: 0
Views: 1094
Reputation: 547
Simply add this to your navigation view XML
android:theme="@style/Theme.AppCompat.Light"
Upvotes: 2
Reputation: 584
To switch between themes dynamically you simply need to call setTheme before super onCreate like this:
public void onCreate(Bundle savedInstanceState) {
setTheme(android.R.style.Theme);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_two);
}
Upvotes: 0