Reputation: 2524
I'm working on an app with a SlidingUpPanelLayout (com.sothree.slidinguppanel.SlidingUpPanelLayout
). When expanding this Layout, it should fill the screen, up to the top of the statusbar. But the status bar is not completely transparent.
I already tried setting the window flags to View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
, as well as adding <item name="android:windowTranslucentStatus">true</item>
to true.
It actually works for the Navigation Drawer, but not for the SlidingUpPanelLayout.
activity_main.xml:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/mDrawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<android.support.design.internal.ScrimInsetsFrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<include layout="@layout/layout_slidingpanel" />
</android.support.design.internal.ScrimInsetsFrameLayout>
<android.support.design.widget.NavigationView
android:id="@+id/mNavigationView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/layout_drawer_header"
app:menu="@menu/menu_drawer" />
</android.support.v4.widget.DrawerLayout>
layout_slidingpanel.xml:
<?xml version="1.0" encoding="utf-8"?>
<com.sothree.slidinguppanel.SlidingUpPanelLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:sothree="http://schemas.android.com/apk/res-auto"
android:id="@+id/mSlidingPanelLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="bottom"
sothree:umanoOverlay="false"
sothree:umanoPanelHeight="0dp"
sothree:umanoShadowHeight="@dimen/cardview_default_elevation">
<FrameLayout
android:id="@+id/mActivityContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/slidingpanel"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/mPlayerContainer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<fragment
class="at.guger.musixs.fragment.player.MiniPlayerFragment"
android:id="@+id/mMiniPlayerFragment"
android:layout_width="match_parent"
android:layout_height="@dimen/miniplayer_height" />
</FrameLayout>
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
How do I set the Status Bar to transparent or how do I have to create my layout to get a completely visible layout?
Thanks in advance!
Upvotes: 1
Views: 101