I have an app that consists of two fragments connected with ViewPager
. The one on the left has custom background, the one on the right has basic light theme (white background, black text color, etc.). Now I want to implement DayNight
theme to the right fragment
(not to the one that has custom background). I tried to set DayNight
to the main activity in AndroidManifest, but it changed the whole app - the left fragment
and the right fragment
.
Manifest:
android:theme="@style/MyTheme"
Styles.xml:
<style name="MyTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
...
</style>
Is it possible to set DayNight
theme to only one of them? Thank you very much for your advice.