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

Commit 64b79a9f authored by Jagrut Desai's avatar Jagrut Desai Committed by Android (Google) Code Review
Browse files

Merge "Exposing functionality to pin Taskbar from TaskbarDividerPopupView." into udc-dev

parents 2d6a8e3a c6d625b8
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -13,16 +13,16 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/taskbar_divider_container"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/taskbar_icon_min_touch_size"
    android:layout_height="@dimen/taskbar_icon_min_touch_size"
    android:contentDescription="@string/taskbar_divider_a11y_title"
    android:backgroundTint="@android:color/transparent">

    <View
        android:id="@+id/taskbar_divider_bar"
        android:layout_height="32dp"
        android:layout_width="2dp"
        android:layout_gravity="center"
        android:background="@drawable/bg_rounded_corner_bottom_sheet_handle" />
    <!-- TODO(b/265347148): Create separate drawable -->
        android:background="@drawable/taskbar_divider_bg" />
</FrameLayout>
 No newline at end of file
+98 −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.
-->
<com.android.launcher3.taskbar.TaskbarDividerPopupView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="@dimen/taskbar_pinning_popup_menu_width"
    android:layout_height="wrap_content"
    android:focusable="true"
    android:background="@drawable/popup_background_material_u"
    android:orientation="vertical">

    <LinearLayout
        android:id="@+id/taskbar_switch_option"
        android:layout_width="match_parent"
        android:layout_height="52dp"
        android:layout_gravity="center_vertical"
        android:elevation="2dp"
        android:focusable="true"
        android:clickable="true"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:background="@drawable/top_rounded_popup_ripple"
        android:paddingEnd="10dp"
        android:paddingStart="10dp"
        android:theme="@style/PopupItem">

        <View
            android:layout_margin="6dp"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:background="@drawable/ic_visibility"
            android:backgroundTint="?android:attr/textColorPrimary" />

        <Switch
            style="@style/BaseIcon"
            android:id="@+id/taskbar_pinning_switch"
            android:background="@null"
            android:clickable="false"
            android:gravity="start|center_vertical"
            android:textAlignment="viewStart"
            android:paddingStart="12dp"
            android:singleLine="true"
            android:ellipsize="end"
            android:textSize="14sp"
            android:textColor="?android:attr/textColorPrimary"
            android:text="@string/always_show_taskbar" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/navigation_mode_switch_option"
        android:layout_width="match_parent"
        android:layout_height="52dp"
        android:layout_gravity="center_vertical"
        android:elevation="2dp"
        android:clickable="true"
        android:focusable="true"
        android:background="@drawable/bottom_rounded_popup_ripple"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:paddingEnd="10dp"
        android:paddingStart="10dp"
        android:theme="@style/PopupItem">

        <View
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_margin="4dp"
            android:background="@drawable/ic_touch"
            android:backgroundTint="?android:attr/textColorPrimary" />

        <com.android.launcher3.BubbleTextView
            style="@style/BaseIcon"
            android:id="@+id/change_navigation_mode_text"
            android:gravity="start|center_vertical"
            android:textAlignment="viewStart"
            android:paddingStart="12dp"
            android:singleLine="true"
            android:ellipsize="end"
            android:textSize="14sp"
            android:textColor="?android:attr/textColorPrimary"
            android:text="@string/change_navigation_mode" />

    </LinearLayout>
</com.android.launcher3.taskbar.TaskbarDividerPopupView>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -341,6 +341,9 @@
    <dimen name="taskbar_edu_features_lottie_height">106dp</dimen>
    <dimen name="taskbar_edu_features_horizontal_spacing">24dp</dimen>

    <!--- Taskbar Pinning -->
    <dimen name="taskbar_pinning_popup_menu_width">300dp</dimen>

    <!-- Recents overview -->
    <dimen name="recents_filter_icon_size">30dp</dimen>

+7 −0
Original line number Diff line number Diff line
@@ -277,6 +277,13 @@
    <string name="taskbar_a11y_hidden_title">Taskbar hidden</string>
    <!-- Accessibility title for the Taskbar window on phones. [CHAR_LIMIT=NONE] -->
    <string name="taskbar_phone_a11y_title">Navigation bar</string>
    <!-- Text in popup dialog for user to switch between always showing Taskbar or not. [CHAR LIMIT=30] -->
    <string name="always_show_taskbar">Always show Taskbar</string>
    <!-- Text in popup dialog for user to switch between system navigation modes. [CHAR LIMIT=30] -->
    <string name="change_navigation_mode">Change navigation mode</string>
    <!-- Accessibility title for the Taskbar vertical divider icon. [CHAR_LIMIT=NONE] -->
    <string name="taskbar_divider_a11y_title">Taskbar Divider</string>


    <!-- Label for moving drop target to the top or left side of the screen, depending on orientation (from the Taskbar only). -->
    <string name="move_drop_target_top_or_left">Move to top&#47;left</string>
+2 −1
Original line number Diff line number Diff line
@@ -238,7 +238,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
                        ? new DesktopTaskbarRecentAppsController(this)
                        : TaskbarRecentAppsController.DEFAULT,
                new TaskbarEduTooltipController(this),
                new KeyboardQuickSwitchController());
                new KeyboardQuickSwitchController(),
                new TaskbarDividerPopupController(this));
    }

    public void init(@NonNull TaskbarSharedState sharedState) {
Loading