Android P SystemUI之super_status_bar.xml解析

super_status_bar.xml

源码:\frameworks\base\packages\SystemUI\res\layout\super_status_bar.xml

<!-- This is the combined status bar / notification panel window. -->
<com.android.systemui.statusbar.phone.StatusBarWindowView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:sysui="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <com.android.systemui.statusbar.BackDropView
            android:id="@+id/backdrop"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone"
            sysui:ignoreRightInset="true"
            >
        <ImageView android:id="@+id/backdrop_back"
                   android:layout_width="match_parent"
                   android:scaleType="centerCrop"
                   android:layout_height="match_parent" />
        <ImageView android:id="@+id/backdrop_front"
                   android:layout_width="match_parent"
                   android:layout_height="match_parent"
                   android:scaleType="centerCrop"
                   android:visibility="invisible" />
    </com.android.systemui.statusbar.BackDropView>

    <com.android.systemui.statusbar.ScrimView
        android:id="@+id/scrim_behind"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:importantForAccessibility="no"
        sysui:ignoreRightInset="true"
        />

    <FrameLayout
        android:id="@+id/status_bar_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <ViewStub android:id="@+id/fullscreen_user_switcher_stub"
              android:layout="@layout/car_fullscreen_user_switcher"
              android:layout_width="match_parent"
              android:layout_height="match_parent"/>

    <include layout="@layout/status_bar_expanded"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="invisible" />

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

    <com.android.systemui.statusbar.ScrimView
        android:id="@+id/scrim_in_front"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:importantForAccessibility="no"
        sysui:ignoreRightInset="true"
        />
</com.android.systemui.statusbar.phone.StatusBarWindowView>

super_status_bar组成结构:
1、com.android.systemui.statusbar.BackDropView,显示媒体作品的视图,只在锁屏界面显示。
2、com.android.systemui.statusbar.ScrimView,id = scrim_behind,状态栏下拉的背景
3、status_bar_container,状态栏布局
4、ViewStub,id=fullscreen_user_switcher_stub,多用户选择界面
5、status_bar_expanded,下拉通知栏布局
6、brightness_mirror,亮度调节UI
7、com.android.systemui.statusbar.ScrimView,id = scrim_in_front,状态栏下拉的背景

我们主要看status_bar_container,状态栏UI布局。

你可能感兴趣的:(Android,P窗口机制,SystemUI,android9.0,状态栏,布局)