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

Commit 4dc98930 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove Change Navigation Mode option for Taskbar Divider Popup Menu" into udc-qpr-dev

parents e207075b 8d326473
Loading
Loading
Loading
Loading
+1 −37
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@
        android:clickable="true"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:background="@drawable/top_rounded_popup_ripple"
        android:background="@drawable/rounded_popup_ripple"
        android:paddingEnd="10dp"
        android:paddingStart="10dp"
        android:theme="@style/PopupItem">
@@ -59,40 +59,4 @@
            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
+0 −13
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ package com.android.launcher3.taskbar

import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
import android.graphics.Rect
import android.graphics.drawable.GradientDrawable
import android.util.AttributeSet
@@ -44,9 +43,6 @@ constructor(
    companion object {
        private const val TAG = "TaskbarDividerPopupView"
        private const val DIVIDER_POPUP_CLOSING_DELAY = 500L
        private const val SETTINGS_PACKAGE_NAME = "com.android.settings"
        private const val CHANGE_NAVIGATION_MODE_ACTION =
            "com.android.settings.NAVIGATION_MODE_SETTINGS"

        @JvmStatic
        fun createAndPopulate(
@@ -103,21 +99,12 @@ constructor(
        super.onFinishInflate()
        val taskbarSwitchOption = findViewById<LinearLayout>(R.id.taskbar_switch_option)
        val alwaysShowTaskbarSwitch = findViewById<Switch>(R.id.taskbar_pinning_switch)
        val navigationModeChangeOption =
            findViewById<LinearLayout>(R.id.navigation_mode_switch_option)
        alwaysShowTaskbarSwitch.isChecked = alwaysShowTaskbarOn
        taskbarSwitchOption.setOnClickListener {
            alwaysShowTaskbarSwitch.isClickable = true
            alwaysShowTaskbarSwitch.isChecked = !alwaysShowTaskbarOn
            onClickAlwaysShowTaskbarSwitchOption()
        }
        navigationModeChangeOption.setOnClickListener {
            context.startActivity(
                Intent(CHANGE_NAVIGATION_MODE_ACTION)
                    .setPackage(SETTINGS_PACKAGE_NAME)
                    .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            )
        }
    }

    /** Orient object as usual and then center object horizontally. */
+1 −4
Original line number Diff line number Diff line
@@ -18,10 +18,7 @@
    <item android:id="@android:id/mask">
        <shape android:shape="rectangle">
            <solid android:color="#FFFFFFFF"/>
            <corners android:bottomLeftRadius="@dimen/dialogCornerRadius"
                android:bottomRightRadius="@dimen/dialogCornerRadius"
                android:topLeftRadius="0dp"
                android:topRightRadius="0dp"/>
            <corners android:radius="@dimen/dialogCornerRadius" />
        </shape>
    </item>
</ripple>
 No newline at end of file
+0 −27
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.
-->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item android:id="@android:id/mask">
        <shape android:shape="rectangle">
            <solid android:color="#FFFFFFFF"/>
            <corners android:bottomLeftRadius="0dp"
                android:bottomRightRadius="0dp"
                android:topLeftRadius="@dimen/dialogCornerRadius"
                android:topRightRadius="@dimen/dialogCornerRadius"/>
        </shape>
    </item>
</ripple>
 No newline at end of file