I try to write an application using one activity-multiple fragment approach. Some pages should has translucent toolbar but not others.
new MyFragment(isTranslucentToolbar)
But theme property belongs to application.
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/AppTheme">
If I set this property as below, I cannot change theme of the fragment.
<style name="AppTheme" parent="@style/Theme.AppCompat.Light">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowDisablePreview">true</item>
</style>
<style name="AppTheme.Transparent" parent="AppTheme">
<item name="windowActionBarOverlay">true</item>
<item name="android:windowTranslucentStatus">true</item>
</style>
If I set the theme as transparent, how do I create a fragment with non-translucent toolbar? I can arrange the margin&padding values of fragment root layout and statusbar bar color programmatically.
Is this any way of this task?