Рисование видов под прозрачной строкой состояния - PullRequest
0 голосов
/ 26 октября 2018

Я делаю приложение для браузера с прозрачной строкой состояния.Я попытался использовать android: windowTranslucentStatus , но моя строка состояния становится серой.Теперь я использую android: windowDrawsSystemBarBackgrounds , но я не могу нарисовать свои виды под ним.Вот изображение, чтобы вы могли увидеть, как оно выглядит:

Браузер Lime

Мой макет выглядит следующим образом:

    <?xml version="1.0" encoding="utf-8"?>
<com.mxn.soul.flowingdrawer_core.FlowingDrawer
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawerLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/transparent"
    android:fitsSystemWindows="true"
    app:edMenuSize="260dp"
    app:edPosition="1">

        <RelativeLayout
            android:fitsSystemWindows="false"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <RelativeLayout
                android:id="@+id/rootRR"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_below="@+id/statusBar"
                android:focusable="true"
                android:focusableInTouchMode="true">

                <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
                    android:id="@+id/swipeToRefresh"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <RelativeLayout
                        android:id="@+id/webRoot"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:clickable="true"
                        android:focusable="true">

                        <LinearLayout
                            android:id="@+id/shader"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:background="@color/night_shader"
                            android:elevation="7dp"
                            android:orientation="vertical"
                            android:visibility="gone" />

                    </RelativeLayout>

                </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

                <LinearLayout
                    android:id="@+id/about_page"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignParentTop="true"
                    android:elevation="82dp"
                    android:visibility="invisible">

                    <include layout="@layout/about_page" />

                </LinearLayout>

                <LinearLayout
                    android:id="@+id/toolbarLayout"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@color/white"
                    android:orientation="vertical">

                    <include layout="@layout/tablet_tab_switcher" />

                    <androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
                        xmlns:app="http://schemas.android.com/apk/res-auto"
                        android:id="@+id/toolbar"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:visibility="visible"
                        app:contentInsetEnd="0dp"
                        app:contentInsetStart="0dp">

                        <include layout="@layout/bar" />

                    </androidx.appcompat.widget.Toolbar>

                </LinearLayout>

                <TextView
                    android:id="@+id/abc"
                    android:layout_width="wrap_content"
                    android:layout_height="1dp"
                    android:layout_alignParentEnd="true"
                    android:layout_marginTop="5dp"
                    android:layout_marginEnd="5dp"
                    tools:ignore="RelativeOverlap,SelectableText" />

            </RelativeLayout>

            <LinearLayout
                android:id="@+id/statusBar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:orientation="horizontal" />

            <FrameLayout
                android:id="@+id/customViewContainer"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#000000"
                android:visibility="invisible" />

            <include layout="@layout/tab_switcher" />

        </RelativeLayout>

        <!--menu-->
        <include android:fitsSystemWindows="true" layout="@layout/left_drawer_layout" />
        <!--menu end-->

    </com.mxn.soul.flowingdrawer_core.FlowingDrawer>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...