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

Commit 63be5b53 authored by Charlie Anderson's avatar Charlie Anderson
Browse files

polish for the app shortcut popup, fixing padding on several elements.

Bug: 269343928
Test: manually verify against spec
Change-Id: Ib8dd7ab2778644e2220622d43f9774c1de6357e9
parent df57fd82
Loading
Loading
Loading
Loading
+11 −12
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
<com.android.launcher3.notification.NotificationMainView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_height="@dimen/notification_container_height"
    android:orientation="vertical">

    <!-- header -->
@@ -25,14 +25,14 @@
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingEnd="@dimen/notification_padding"
        android:paddingStart="@dimen/notification_padding">
        android:paddingEnd="@dimen/notification_padding_end"
        android:paddingTop="@dimen/notification_padding_header_top"
        android:paddingStart="@dimen/notification_header_padding_start">
        <TextView
            android:id="@+id/notification_text"
            android:paddingTop="@dimen/notification_padding"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|start"
            android:layout_gravity="top|start"
            android:text="@string/notifications_header"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="@dimen/notification_header_text_size"
@@ -42,7 +42,7 @@
            android:layout_width="@dimen/notification_circle_icon_size"
            android:layout_height="@dimen/notification_circle_icon_size"
            android:background="@drawable/notification_circle"
            android:layout_gravity="bottom|end"
            android:layout_gravity="top|end"
            android:gravity="center"
            android:textColor="?android:attr/textColorPrimary"
            android:textSize="@dimen/notification_header_count_text_size"
@@ -54,6 +54,8 @@
        android:id="@+id/main_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="@dimen/notification_padding_top"
        android:paddingBottom="@dimen/notification_padding_bottom"
        android:focusable="true" >

        <LinearLayout
@@ -62,9 +64,7 @@
            android:layout_height="match_parent"
            android:gravity="center_vertical"
            android:orientation="vertical"
            android:paddingTop="@dimen/notification_padding"
            android:paddingBottom="@dimen/notification_padding"
            android:paddingEnd="@dimen/notification_padding"
            android:paddingEnd="@dimen/notification_padding_end"
            android:paddingStart="@dimen/notification_main_text_padding_start">
            <TextView
                android:id="@+id/title"
@@ -91,9 +91,8 @@
            android:id="@+id/popup_item_icon"
            android:layout_width="@dimen/notification_icon_size"
            android:layout_height="@dimen/notification_icon_size"
            android:layout_gravity="start"
            android:layout_marginTop="@dimen/notification_padding"
            android:layout_marginStart="@dimen/notification_icon_padding" />
            android:layout_gravity="start|center_vertical"
            android:layout_marginStart="@dimen/notification_icon_padding_start"/>

    </FrameLayout>
</com.android.launcher3.notification.NotificationMainView>
 No newline at end of file
+1 −2
Original line number Diff line number Diff line
@@ -18,8 +18,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/system_shortcut_header_icon_touch_size"
    android:layout_height="@dimen/system_shortcut_header_icon_touch_size"
    android:background="?android:attr/selectableItemBackgroundBorderless"
    android:tint="?attr/iconOnlyShortcutColor"
    android:tintMode="src_in"
    android:padding="@dimen/system_shortcut_header_icon_padding"
    android:theme="@style/PopupItem" />
    android:theme="@style/PopupItemIconOnly" />
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->

<ImageView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/system_shortcut_header_icon_touch_size"
    android:layout_height="@dimen/system_shortcut_header_icon_touch_size"
    android:tint="?attr/iconOnlyShortcutColor"
    android:tintMode="src_in"
    android:padding="@dimen/system_shortcut_header_icon_padding"
    android:paddingStart="@dimen/system_shortcut_header_icon_padding_inner"
    android:paddingEnd="@dimen/system_shortcut_header_icon_padding_outer"
    android:theme="@style/PopupItemIconOnly" />
 No newline at end of file
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->

<ImageView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/system_shortcut_header_icon_touch_size"
    android:layout_height="@dimen/system_shortcut_header_icon_touch_size"
    android:tint="?attr/iconOnlyShortcutColor"
    android:tintMode="src_in"
    android:padding="@dimen/system_shortcut_header_icon_padding"
    android:paddingStart="@dimen/system_shortcut_header_icon_padding_outer"
    android:paddingEnd="@dimen/system_shortcut_header_icon_padding_inner"
    android:theme="@style/PopupItemIconOnly" />
+19 −11
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@
    <dimen name="deep_shortcuts_elevation">2dp</dimen>
    <dimen name="bg_popup_padding">2dp</dimen>
    <dimen name="bg_popup_item_width">216dp</dimen>
    <dimen name="bg_popup_item_height">56dp</dimen>
    <dimen name="bg_popup_item_height">52dp</dimen>
    <dimen name="bg_popup_item_vertical_padding">12dp</dimen>
    <dimen name="pre_drag_view_scale">6dp</dimen>
    <!-- an icon with shortcuts must be dragged this far before the container is removed. -->
@@ -290,10 +290,10 @@
    <dimen name="popup_margin">2dp</dimen>
    <dimen name="popup_single_item_radius">100dp</dimen>
    <dimen name="popup_smaller_radius">4dp</dimen>
    <dimen name="deep_shortcut_drawable_padding">12dp</dimen>
    <dimen name="deep_shortcut_drawable_padding">16dp</dimen>
    <dimen name="deep_shortcut_drag_handle_size">16dp</dimen>
    <dimen name="popup_padding_start">10dp</dimen>
    <dimen name="popup_padding_end">16dp</dimen>
    <dimen name="popup_padding_end">14dp</dimen>
    <dimen name="popup_vertical_padding">4dp</dimen>
    <dimen name="popup_arrow_width">12dp</dimen>
    <dimen name="popup_arrow_height">10dp</dimen>
@@ -301,32 +301,40 @@
    <!-- popup_padding_start + deep_shortcut_icon_size / 2 -->
    <dimen name="popup_arrow_horizontal_center_offset">26dp</dimen>
    <dimen name="popup_arrow_corner_radius">2dp</dimen>
    <!-- popup_padding_start + deep_shortcut_icon_size + 10dp -->
    <dimen name="deep_shortcuts_text_padding_start">52dp</dimen>
    <!-- popup_padding_start + deep_shortcut_icon_size + 12dp -->
    <dimen name="deep_shortcuts_text_padding_start">54dp</dimen>
    <dimen name="system_shortcut_icon_size">20dp</dimen>
    <!-- popup_arrow_horizontal_center_offset - system_shortcut_icon_size / 2 -->
    <dimen name="system_shortcut_margin_start">16dp</dimen>
    <dimen name="system_shortcut_header_height">56dp</dimen>
    <dimen name="system_shortcut_header_height">52dp</dimen>
    <dimen name="system_shortcut_header_icon_touch_size">48dp</dimen>
    <!-- (system_shortcut_header_icon_touch_size - system_shortcut_icon_size) / 2 -->
    <dimen name="system_shortcut_header_icon_padding">14dp</dimen>
    <!-- side of start/end icon near to container edge -->
    <dimen name="system_shortcut_header_icon_padding_outer">16dp</dimen>
    <!-- side of start/end icon far from container edge -->
    <dimen name="system_shortcut_header_icon_padding_inner">12dp</dimen>


    <!-- Notifications -->
    <dimen name="bg_round_rect_radius">8dp</dimen>
    <dimen name="notification_container_height">104dp</dimen>
    <dimen name="notification_max_trans">8dp</dimen>
    <dimen name="notification_space">8dp</dimen>
    <dimen name="notification_padding">16dp</dimen>
    <dimen name="notification_padding_top">18dp</dimen>
    <dimen name="notification_padding_end">16dp</dimen>
    <dimen name="notification_padding_bottom">12dp</dimen>
    <dimen name="notification_padding_top">12dp</dimen>
    <dimen name="notification_padding_header_top">16dp</dimen>
    <dimen name="notification_header_padding_start">14dp</dimen>
    <dimen name="notification_header_text_size">14sp</dimen>
    <dimen name="notification_header_count_text_size">12sp</dimen>
    <dimen name="notification_main_title_size">14sp</dimen>
    <dimen name="notification_main_text_size">14sp</dimen>
    <dimen name="notification_circle_icon_size">24dp</dimen>
    <dimen name="notification_icon_size">32dp</dimen>
    <!-- Space between edge and icon and icon and text -->
    <dimen name="notification_icon_padding">12dp</dimen>
    <dimen name="notification_icon_padding_start">10dp</dimen>
    <!-- notification_icon_padding + notification_icon_size + notification_icon_padding -->
    <dimen name="notification_main_text_padding_start">56dp</dimen>
    <dimen name="notification_main_text_padding_start">54dp</dimen>
    <dimen name="horizontal_ellipsis_size">18dp</dimen>

    <!-- Overview -->
Loading