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

Commit b8ae5511 authored by Julia Kawano's avatar Julia Kawano Committed by Android (Google) Code Review
Browse files

Merge "Fix system bar UI"

parents 1b326539 3f6d3707
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8" ?>
<!--
  ~ Copyright (C) 2020 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle">
  <solid android:color="@color/system_bar_background_pill_color"/>
  <corners android:radius="30dp"/>
</shape>
 No newline at end of file
+9 −7
Original line number Diff line number Diff line
@@ -66,43 +66,45 @@
                android:id="@+id/home"
                style="@style/NavigationBarButton"
                systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
                systemui:highlightWhenSelected="true"
                systemui:icon="@drawable/car_ic_home"
                systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"
                systemui:selectedIcon="@drawable/car_ic_home_selected"/>
                systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"/>

            <com.android.systemui.car.navigationbar.CarNavigationButton
                android:id="@+id/phone_nav"
                style="@style/NavigationBarButton"
                systemui:highlightWhenSelected="true"
                systemui:icon="@drawable/car_ic_phone"
                systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
                systemui:packages="com.android.car.dialer"
                systemui:selectedIcon="@drawable/car_ic_phone_selected"/>
                systemui:packages="com.android.car.dialer"/>

            <com.android.systemui.car.navigationbar.CarNavigationButton
                android:id="@+id/grid_nav"
                style="@style/NavigationBarButton"
                systemui:componentNames="com.android.car.carlauncher/.AppGridActivity"
                systemui:highlightWhenSelected="true"
                systemui:icon="@drawable/car_ic_apps"
                systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"
                systemui:selectedIcon="@drawable/car_ic_apps_selected"/>
                systemui:intent="intent:#Intent;component=com.android.car.carlauncher/.AppGridActivity;launchFlags=0x24000000;end"/>

            <com.android.systemui.car.navigationbar.CarNavigationButton
                android:id="@+id/hvac"
                style="@style/NavigationBarButton"
                systemui:highlightWhenSelected="true"
                systemui:icon="@drawable/car_ic_hvac"
                systemui:intent="intent:#Intent;action=android.car.intent.action.TOGGLE_HVAC_CONTROLS;end"
                systemui:selectedIcon="@drawable/car_ic_hvac_selected"
                systemui:broadcast="true"/>

            <com.android.systemui.car.navigationbar.CarNavigationButton
                android:id="@+id/notifications"
                style="@style/NavigationBarButton"
                systemui:highlightWhenSelected="true"
                systemui:icon="@drawable/car_ic_notification"
                systemui:longIntent="intent:#Intent;component=com.android.car.bugreport/.BugReportActivity;end"/>

            <com.android.systemui.car.navigationbar.AssitantButton
                android:id="@+id/assist"
                style="@style/NavigationBarButton"
                systemui:highlightWhenSelected="true"
                systemui:icon="@drawable/ic_mic_white"
                systemui:useDefaultAppIconForRole="true"/>

+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:tintMode="src_in"
            android:tint="@color/car_nav_icon_fill_color"
            android:tint="@color/car_nav_icon_fill_color_selected"
            android:clickable="false"
        />

+55 −42
Original line number Diff line number Diff line
@@ -31,43 +31,30 @@
        android:layoutDirection="ltr">

        <FrameLayout
            android:id="@+id/user_name_container"
            android:id="@+id/system_icon_area"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentStart="true"
            android:layout_toStartOf="@+id/clock_container"
        >

            <com.android.systemui.car.navigationbar.CarNavigationButton
                android:id="@+id/user_name"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                systemui:icon="@null"
                systemui:intent="intent:#Intent;component=com.android.car.settings/.users.UserSwitcherActivity;launchFlags=0x24000000;end"
            >
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
            android:layout_marginTop="@dimen/car_padding_2"
            android:layout_centerVertical="true"
            android:gravity="center_vertical"
        >
                    <ImageView
                        android:id="@+id/user_avatar"
            <com.android.systemui.car.navigationbar.CarNavigationButton
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                        android:src="@drawable/car_ic_user_icon"
                        android:paddingLeft="@dimen/system_bar_user_icon_padding"
                        android:paddingRight="@dimen/system_bar_user_icon_padding"
                    />
                    <TextView
                        android:id="@+id/user_name_text"
                android:background="@drawable/system_bar_background_pill"
                android:layout_weight="1"
                android:layout_marginStart="@dimen/car_padding_2"
                android:gravity="center_vertical"
                systemui:intent="intent:#Intent;component=com.android.car.settings/.common.CarSettingActivities$QuickSettingActivity;launchFlags=0x24000000;end">

                <include
                    layout="@layout/system_icons"
                    android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center_vertical"
                        android:textAppearance="@style/TextAppearance.SystemBar.Username"
                        android:maxLines="1"
                />
                </LinearLayout>
            </com.android.systemui.car.navigationbar.CarNavigationButton>
        </FrameLayout>

@@ -96,25 +83,51 @@
            />
        </FrameLayout>

        <LinearLayout
            android:id="@+id/system_icon_area"
        <FrameLayout
            android:id="@+id/user_name_container"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentEnd="true"
            android:layout_centerVertical="true"
            android:paddingEnd="@*android:dimen/car_padding_1"
            android:layout_marginTop="@dimen/car_padding_2"
        >
            <com.android.systemui.car.navigationbar.CarNavigationButton
                android:id="@+id/user_name"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_marginEnd="@dimen/car_padding_2"
                android:background="@drawable/system_bar_background_pill"
                android:gravity="center_vertical"
                systemui:intent="intent:#Intent;component=com.android.car.settings/.users.UserSwitcherActivity;launchFlags=0x24000000;end"
            >
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:layout_marginStart="@dimen/car_padding_2"
                    android:layout_marginEnd="@dimen/car_padding_2"
                    android:gravity="center_vertical"
                >

            <include
                layout="@layout/system_icons"
                    <ImageView
                        android:id="@+id/user_avatar"
                        android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                        android:layout_height="match_parent"
                        android:src="@drawable/car_ic_user_icon"
                        android:layout_marginEnd="@dimen/system_bar_user_icon_padding"
                    />
                    <TextView
                        android:id="@+id/user_name_text"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:gravity="center_vertical"
                        android:textAppearance="@style/TextAppearance.SystemBar.Username"
                        android:maxLines="1"
                        android:maxLength="10"
                        android:layout_marginEnd="@dimen/system_bar_user_icon_padding"
                    />
                </LinearLayout>
            </com.android.systemui.car.navigationbar.CarNavigationButton>
        </FrameLayout>
    </RelativeLayout>

</com.android.systemui.car.navigationbar.CarNavigationBarView>
+3 −2
Original line number Diff line number Diff line
@@ -24,10 +24,11 @@

    <com.android.systemui.statusbar.phone.StatusIconContainer
        android:id="@+id/statusIcons"
        android:layout_width="0dp"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:paddingEnd="4dp"
        android:padding="10dp"
        android:scaleType="fitCenter"
        android:gravity="center_vertical"
        android:orientation="horizontal"
    />
Loading