mohamadreza navab
mohamadreza navab

Reputation: 333

How to translucent only one fragment

I use single activity architecture and navigation component. I want to translucent only my splash fragment by changing style all fragment are changed Setting fitSystemWindows true in splash fragment not work :(

Like this sample

please help me

Upvotes: 0

Views: 148

Answers (1)

Morteza Allahyari
Morteza Allahyari

Reputation: 1120

You must follow these steps:

1- Add lines below inner your style theme

<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>

2- Add this property android:fitsSystemWindows="true" to root element of fragments that you don't want to make them translucent

Upvotes: 1

Related Questions