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

Commit 34c6bdee authored by kwaky's avatar kwaky
Browse files

Support Unseen Indicator Icon in all CarNavigationButtons

Bug: 146508662
Test: Manual + Unit Tests
Change-Id: I464f4f080f739923492daf2715753e3892ada7dd
parent b130bfbe
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:viewportWidth="44"
        android:viewportHeight="44"
        android:width="44dp"
        android:height="44dp">
    <path
        android:pathData="M22 39.125C23.925 39.125 25.5 37.55 25.5 35.625L18.5 35.625C18.5 37.55 20.0575 39.125 22 39.125ZM32.5 28.625L32.5 19.875C32.5 14.5025 29.63 10.005 24.625 8.815L24.625 7.625C24.625 6.1725 23.4525 5 22 5C20.5475 5 19.375 6.1725 19.375 7.625L19.375 8.815C14.3525 10.005 11.5 14.485 11.5 19.875L11.5 28.625L8 32.125L8 33.875L36 33.875L36 32.125L32.5 28.625Z"
        android:fillColor="@color/car_nav_icon_fill_color_selected" />
</vector>
 No newline at end of file
+0 −34
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:viewportWidth="44"
        android:viewportHeight="44"
        android:width="44dp"
        android:height="44dp">
  <path
      android:pathData="M22 39.125C23.925 39.125 25.5 37.55 25.5 35.625L18.5 35.625C18.5 37.55 20.0575 39.125 22 39.125ZM32.5 28.625L32.5 19.875C32.5 14.5025 29.63 10.005 24.625 8.815L24.625 7.625C24.625 6.1725 23.4525 5 22 5C20.5475 5 19.375 6.1725 19.375 7.625L19.375 8.815C14.3525 10.005 11.5 14.485 11.5 19.875L11.5 28.625L8 32.125L8 33.875L36 33.875L36 32.125L32.5 28.625Z"
      android:fillColor="@color/car_nav_icon_fill_color_selected" />
  <group
      android:translateX="30"
      android:translateY="2">
    <path
        android:fillColor="@color/car_nav_notification_unseen_indicator_color"
        android:strokeWidth="1"
        android:pathData="M 6 0 C 9.31370849898 0 12 2.68629150102 12 6 C 12 9.31370849898 9.31370849898 12 6 12 C 2.68629150102 12 0 9.31370849898 0 6 C 0 2.68629150102 2.68629150102 0 6 0 Z" />
  </group>
</vector>
+1 −4
Original line number Diff line number Diff line
@@ -19,14 +19,11 @@
        android:viewportHeight="44"
        android:width="44dp"
        android:height="44dp">
  <path
      android:pathData="M22 39.125C23.925 39.125 25.5 37.55 25.5 35.625L18.5 35.625C18.5 37.55 20.0575 39.125 22 39.125ZM32.5 28.625L32.5 19.875C32.5 14.5025 29.63 10.005 24.625 8.815L24.625 7.625C24.625 6.1725 23.4525 5 22 5C20.5475 5 19.375 6.1725 19.375 7.625L19.375 8.815C14.3525 10.005 11.5 14.485 11.5 19.875L11.5 28.625L8 32.125L8 33.875L36 33.875L36 32.125L32.5 28.625Z"
      android:fillColor="@color/car_nav_icon_fill_color" />
  <group
      android:translateX="30"
      android:translateY="2">
    <path
        android:fillColor="@color/car_nav_notification_unseen_indicator_color"
        android:fillColor="@color/car_nav_unseen_indicator_color"
        android:strokeWidth="1"
        android:pathData="M 6 0 C 9.31370849898 0 12 2.68629150102 12 6 C 12 9.31370849898 9.31370849898 12 6 12 C 2.68629150102 12 0 9.31370849898 0 6 C 0 2.68629150102 2.68629150102 0 6 0 Z" />
  </group>
+2 −4
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@
            style="@style/NavigationBarButton"
            systemui:icon="@drawable/car_ic_notification"
            systemui:longIntent="intent:#Intent;component=com.android.car.bugreport/.BugReportActivity;end"
            systemui:selectedIcon="@drawable/car_ic_notification_selected"
        />

        <Space
@@ -138,8 +137,7 @@
        android:paddingStart="@dimen/car_keyline_1"
        android:paddingEnd="@dimen/car_keyline_1"
        android:gravity="center"
        android:visibility="gone">

    </LinearLayout>
        android:visibility="gone"
    />

</com.android.systemui.navigationbar.car.CarNavigationBarView>
 No newline at end of file
+21 −7
Original line number Diff line number Diff line
@@ -18,13 +18,12 @@
-->

<merge xmlns:android="http://schemas.android.com/apk/res/android">
    <LinearLayout
    <FrameLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/car_nav_button_icon"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:gravity="center"
        android:animateLayoutChanges="true"
        android:orientation="vertical">

@@ -32,20 +31,35 @@
            android:id="@+id/car_nav_button_icon_image"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:layout_gravity="center"
            android:animateLayoutChanges="true"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter">
        </com.android.keyguard.AlphaOptimizedImageButton>
            android:scaleType="fitCenter"
            android:clickable="false"
        />

        <com.android.keyguard.AlphaOptimizedImageButton
            android:id="@+id/car_nav_button_more_icon"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:layout_gravity="center"
            android:animateLayoutChanges="true"
            android:src="@drawable/car_ic_arrow"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter">
        </com.android.keyguard.AlphaOptimizedImageButton>
            android:scaleType="fitCenter"
            android:clickable="false"
        />

    </LinearLayout>
        <ImageView
            android:id="@+id/car_nav_button_unseen_icon"
            android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:layout_gravity="center"
            android:src="@drawable/car_ic_unseen_indicator"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:clickable="false"
        />

    </FrameLayout>
</merge>
Loading