4

Here is my implementation (Only link here, sorry about that): enter image description here.

If I use android:windowTranslucentStatus=true and android:fitsSystemWindows=true, there is still a layer in status bar, but I want to make it Google Play like: enter image description here.

In Google Play app, the status bar is totally translucent. How to?

Here is my code:

<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">
    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="?attr/actionBarSize"
        android:fitsSystemWindows="true">
        <android.support.design.widget.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            app:contentScrim="?attr/colorPrimary">
            <ImageView
                android:id="@+id/fuli"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:minHeight="160dp"
                android:scaleType="centerCrop"
                android:fitsSystemWindows="true"
                app:layout_collapseMode="parallax"/>
            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:fitsSystemWindows="false"
                app:layout_collapseMode="pin"/>
        </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>
    <android.support.v7.widget.RecyclerView
        android:id="@+id/recycler_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingBottom="88dp"
        android:clipToPadding="false"
        android:scrollbars="vertical"
        android:scrollbarStyle="outsideOverlay"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</android.support.design.widget.CoordinatorLayout>
<style name="DailyTheme" parent="Theme.Design.Light">
    <item name="windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="android:windowTranslucentStatus">true</item>
</style>
rafsanahmad007
  • 23,683
  • 6
  • 47
  • 62
Ebn Zhang
  • 241
  • 2
  • 9

0 Answers0