Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7ecd381 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Re-add support for the app shelf"

parents 12eef9f1 4f878ef5
Loading
Loading
Loading
Loading
+2 −18
Original line number Diff line number Diff line
@@ -25,10 +25,9 @@
        android:layout_height="match_parent">

        <LinearLayout
            android:id="@+id/start_group"
            android:id="@+id/ends_group"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="start"
            android:orientation="horizontal" />

        <LinearLayout
@@ -38,13 +37,6 @@
            android:gravity="center"
            android:orientation="horizontal" />

        <LinearLayout
            android:id="@+id/end_group"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="end"
            android:orientation="horizontal" />

    </FrameLayout>

    <FrameLayout
@@ -53,10 +45,9 @@
        android:layout_height="match_parent">

        <LinearLayout
            android:id="@+id/start_group_lightsout"
            android:id="@+id/ends_group_lightsout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="start"
            android:orientation="horizontal" />

        <LinearLayout
@@ -66,13 +57,6 @@
            android:gravity="center"
            android:orientation="horizontal" />

        <LinearLayout
            android:id="@+id/end_group_lightsout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="end"
            android:orientation="horizontal" />

    </FrameLayout>

    <com.android.systemui.statusbar.policy.DeadZone
+31 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2016, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
-->

<!-- Container for the app shelf. -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/app_shelf"
    android:orientation="horizontal"
    android:layout_height="match_parent"
    android:layout_width="0dp"
    android:layout_weight="1">
    <com.android.systemui.statusbar.phone.NavigationBarApps
        android:id="@+id/navigation_bar_apps"
        android:layout_width="wrap_content"
        android:layout_height="match_parent" />
</LinearLayout>
+0 −331
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
**     http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
-->

<!-- Navigation bar with app shortcuts. See also navigation_bar.xml. -->
<com.android.systemui.statusbar.phone.NavigationBarView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res-auto"
    android:layout_height="match_parent"
    android:layout_width="match_parent"
    android:background="@drawable/system_bar_background"
    >

    <!-- Portrait layout. -->
    <FrameLayout android:id="@+id/rot0"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        >

        <LinearLayout
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:orientation="horizontal"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:id="@+id/nav_buttons"
            android:animateLayoutChanges="true"
            >

            <!-- Back button is flush left. -->
            <com.android.systemui.statusbar.policy.KeyButtonView
                android:id="@+id/back"
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_back"
                android:scaleType="centerInside"
                systemui:keyCode="4"
                android:layout_weight="0"
                android:contentDescription="@string/accessibility_back"
                />

            <com.android.systemui.statusbar.policy.KeyButtonView
                android:id="@+id/home"
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_home"
                android:scaleType="centerInside"
                systemui:keyCode="3"
                systemui:keyRepeat="true"
                android:layout_weight="0"
                android:contentDescription="@string/accessibility_home"
                />

            <!-- Container for the app shelf. -->
            <LinearLayout
                android:id="@+id/app_shelf"
                android:orientation="horizontal"
                android:layout_height="match_parent"
                android:layout_width="0dp"
                android:layout_weight="1"
                >
                <com.android.systemui.statusbar.phone.NavigationBarApps
                    android:id="@+id/navigation_bar_apps"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    />
            </LinearLayout>

            <FrameLayout
                android:layout_width="@dimen/navigation_extra_key_width"
                android:layout_height="match_parent"
                android:layout_weight="0"
                android:layout_marginEnd="2dp" >
                <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
                    android:layout_width="@dimen/navigation_extra_key_width"
                    android:layout_height="match_parent"
                    android:src="@drawable/ic_sysbar_menu"
                    android:scaleType="centerInside"
                    android:layout_marginEnd="2dp"
                    systemui:keyCode="82"
                    android:visibility="invisible"
                    android:contentDescription="@string/accessibility_menu"
                    />
                <com.android.systemui.statusbar.policy.KeyButtonView
                    android:id="@+id/ime_switcher"
                    android:layout_width="@dimen/navigation_extra_key_width"
                    android:layout_height="match_parent"
                    android:layout_marginEnd="2dp"
                    android:scaleType="centerInside"
                    android:src="@drawable/ic_ime_switcher_default"
                    android:visibility="invisible"
                    android:contentDescription="@string/accessibility_ime_switch_button" />
            </FrameLayout>

            <!-- Recents always at the far right. -->
            <com.android.systemui.statusbar.policy.KeyButtonView
                android:id="@+id/recent_apps"
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_recent"
                android:scaleType="centerInside"
                android:layout_weight="0"
                android:contentDescription="@string/accessibility_recent"
                />
        </LinearLayout>

        <!-- lights out layout to match exactly -->
        <LinearLayout
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:orientation="horizontal"
            android:id="@+id/lights_out"
            android:visibility="gone"
            >
            <ImageView
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_lights_out_dot_small"
                android:scaleType="center"
                android:layout_weight="0"
                />
            <ImageView
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_lights_out_dot_large"
                android:scaleType="center"
                android:layout_weight="0"
                />
            <Space
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                />
            <ImageView
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_lights_out_dot_small"
                android:scaleType="center"
                android:layout_weight="0"
                />
        </LinearLayout>

        <com.android.systemui.statusbar.policy.DeadZone
            android:id="@+id/deadzone"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            systemui:minSize="@dimen/navigation_bar_deadzone_size"
            systemui:maxSize="@dimen/navigation_bar_deadzone_size_max"
            systemui:holdTime="@integer/navigation_bar_deadzone_hold"
            systemui:decayTime="@integer/navigation_bar_deadzone_decay"
            systemui:orientation="horizontal"
            android:layout_gravity="top"
            />
    </FrameLayout>

    <!-- Landscape layout. -->
    <FrameLayout android:id="@+id/rot90"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:visibility="gone"
        android:paddingTop="0dp"
        >

        <LinearLayout
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:orientation="horizontal"
            android:clipChildren="false"
            android:clipToPadding="false"
            android:id="@+id/nav_buttons"
            android:animateLayoutChanges="true"
            >

            <!-- Back button is flush left. -->
            <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_back"
                android:scaleType="centerInside"
                systemui:keyCode="4"
                android:layout_weight="0"
                android:contentDescription="@string/accessibility_back"
                />
            <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/home"
                android:layout_width="64dp" android:paddingStart="4dp" android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_home"
                android:scaleType="centerInside"
                systemui:keyCode="3"
                systemui:keyRepeat="true"
                android:layout_weight="0"
                android:contentDescription="@string/accessibility_home"
                />

            <!-- Container for the app shelf. -->
            <LinearLayout
                android:id="@+id/app_shelf"
                android:orientation="horizontal"
                android:layout_height="match_parent"
                android:layout_width="0dp"
                android:layout_weight="1"
                >
                <com.android.systemui.statusbar.phone.NavigationBarApps
                    android:id="@+id/navigation_bar_apps"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    />
            </LinearLayout>

            <FrameLayout
                android:layout_width="@dimen/navigation_extra_key_width"
                android:layout_height="match_parent"
                android:layout_marginEnd="2dp"
                android:layout_weight="0"
                android:visibility="gone" >
                <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/menu"
                    android:layout_width="@dimen/navigation_extra_key_width"
                    android:layout_height="match_parent"
                    android:layout_marginEnd="2dp"
                    android:src="@drawable/ic_sysbar_menu"
                    android:scaleType="centerInside"
                    systemui:keyCode="82"
                    android:visibility="invisible"
                    android:contentDescription="@string/accessibility_menu" />
                <com.android.systemui.statusbar.policy.KeyButtonView
                    android:id="@+id/ime_switcher"
                    android:layout_width="@dimen/navigation_extra_key_width"
                    android:layout_height="match_parent"
                    android:layout_marginEnd="2dp"
                    android:src="@drawable/ic_ime_switcher_default"
                    android:visibility="invisible"
                    android:contentDescription="@string/accessibility_ime_switch_button"
                    android:scaleType="centerInside" />
            </FrameLayout>

            <!-- Recents always at the far right. -->
            <com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/recent_apps"
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_recent"
                android:scaleType="centerInside"
                android:layout_weight="0"
                android:contentDescription="@string/accessibility_recent"
                />
        </LinearLayout>

        <!-- lights out layout to match exactly -->
        <LinearLayout
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:orientation="horizontal"
            android:id="@+id/lights_out"
            android:visibility="gone"
            >
            <ImageView
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_lights_out_dot_small"
                android:scaleType="center"
                android:layout_weight="0"
                />
            <ImageView
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_lights_out_dot_large"
                android:scaleType="center"
                android:layout_weight="0"
                />
            <Space
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                />
            <ImageView
                android:layout_width="64dp"
                android:paddingStart="4dp"
                android:paddingEnd="4dp"
                android:layout_height="match_parent"
                android:src="@drawable/ic_sysbar_lights_out_dot_small"
                android:scaleType="center"
                android:layout_weight="0"
                />
        </LinearLayout>

        <com.android.systemui.statusbar.policy.DeadZone
            android:id="@+id/deadzone"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            systemui:minSize="@dimen/navigation_bar_deadzone_size"
            systemui:maxSize="@dimen/navigation_bar_deadzone_size_max"
            systemui:holdTime="@integer/navigation_bar_deadzone_hold"
            systemui:decayTime="@integer/navigation_bar_deadzone_decay"
            systemui:orientation="horizontal"
            android:layout_gravity="top"
            />
    </FrameLayout>
</com.android.systemui.statusbar.phone.NavigationBarView>
+2 −18
Original line number Diff line number Diff line
@@ -26,10 +26,9 @@
        android:layout_height="match_parent">

        <LinearLayout
            android:id="@+id/start_group"
            android:id="@+id/ends_group"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="start"
            android:orientation="horizontal" />

        <LinearLayout
@@ -39,13 +38,6 @@
            android:gravity="center"
            android:orientation="horizontal" />

        <LinearLayout
            android:id="@+id/end_group"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="end"
            android:orientation="horizontal" />

    </FrameLayout>

    <FrameLayout
@@ -54,10 +46,9 @@
        android:layout_height="match_parent">

        <LinearLayout
            android:id="@+id/start_group_lightsout"
            android:id="@+id/ends_group_lightsout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="start"
            android:orientation="horizontal" />

        <LinearLayout
@@ -67,13 +58,6 @@
            android:gravity="center"
            android:orientation="horizontal" />

        <LinearLayout
            android:id="@+id/end_group_lightsout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="end"
            android:orientation="horizontal" />

    </FrameLayout>

    <com.android.systemui.statusbar.policy.DeadZone
+2 −18
Original line number Diff line number Diff line
@@ -26,10 +26,9 @@
        android:layout_height="match_parent">

        <com.android.systemui.statusbar.phone.ReverseLinearLayout
            android:id="@+id/start_group"
            android:id="@+id/ends_group"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="bottom"
            android:orientation="vertical" />

        <com.android.systemui.statusbar.phone.ReverseLinearLayout
@@ -39,13 +38,6 @@
            android:gravity="center"
            android:orientation="vertical" />

        <com.android.systemui.statusbar.phone.ReverseLinearLayout
            android:id="@+id/end_group"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="top"
            android:orientation="vertical" />

    </FrameLayout>

    <FrameLayout
@@ -54,10 +46,9 @@
        android:layout_height="match_parent">

        <com.android.systemui.statusbar.phone.ReverseLinearLayout
            android:id="@+id/start_group_lightsout"
            android:id="@+id/ends_group_lightsout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="bottom"
            android:orientation="vertical" />

        <com.android.systemui.statusbar.phone.ReverseLinearLayout
@@ -67,13 +58,6 @@
            android:gravity="center"
            android:orientation="vertical" />

        <com.android.systemui.statusbar.phone.ReverseLinearLayout
            android:id="@+id/end_group_lightsout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="top"
            android:orientation="vertical" />

    </FrameLayout>

    <com.android.systemui.statusbar.policy.DeadZone
Loading