mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Remove Change Navigation Mode option for Taskbar Divider Popup Menu" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4dc9893028
@@ -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>
|
||||
@@ -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. */
|
||||
|
||||
@@ -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>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user