Friday, 7 September 2018

Unable to make DrawerLayout background to transparent in Samsung s8+

I am using DrawerLayout in my application. I am using NavigationView for the contents of the navigation drawer and setting its background to transparent using below code snip.

<android.support.design.widget.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="start|center"
    android:background="@android:color/transparent">

</android.support.design.widget.NavigationView>

In Samsung s8+ when I open the drawer it shows a vertical bar at the end. While debugging when I removed transparency from NavigationView what I come to know that Samsung s8+ contain a grey color bar in addition with a background. When I deploy the same code on Red mi 3s it's working fine it just has a background.

Samsung s8+ drawer bg enter image description here

Redmi 3s drawer bg enter image description here

Samsung s8+ drawer bg transparent enter image description here

Redmi 3s drawer bg transparent enter image description here

Please help me to remove this vertical bar.



from Unable to make DrawerLayout background to transparent in Samsung s8+

No comments:

Post a Comment