Customize BubbleTextView for Taskbar Icon Size

Test: Presubmit, manual
Flag: NONE
Bug: 322734668
Change-Id: I50503a45cdf43abed942a846c2517f49124c75e5
This commit is contained in:
Jagrut Desai
2024-03-26 11:29:35 -07:00
parent 2803ccadfb
commit 8fbdf51d18
3 changed files with 10 additions and 14 deletions

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2022 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.
@@ -15,10 +14,9 @@
-->
<!-- Note: The actual size will match the taskbar icon sizes in TaskbarView#onLayout(). -->
<com.android.launcher3.views.IconButtonView
xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.launcher3.views.IconButtonView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/BaseIcon.Workspace.Taskbar"
android:layout_width="@dimen/taskbar_icon_min_touch_size"
android:layout_height="@dimen/taskbar_icon_min_touch_size"
android:contentDescription="@string/all_apps_button_label"
android:backgroundTint="@android:color/transparent"
/>
android:contentDescription="@string/all_apps_button_label" />

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 The Android Open Source Project
<?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.
@@ -13,9 +12,9 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.launcher3.views.IconButtonView
xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.launcher3.views.IconButtonView xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/BaseIcon.Workspace.Taskbar"
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" />
android:backgroundTint="@android:color/transparent"
android:contentDescription="@string/taskbar_divider_a11y_title" />

View File

@@ -58,7 +58,6 @@ import androidx.annotation.UiThread;
import androidx.annotation.VisibleForTesting;
import com.android.launcher3.accessibility.BaseAccessibilityDelegate;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.dot.DotInfo;
import com.android.launcher3.dragndrop.DragOptions.PreDragCondition;
import com.android.launcher3.dragndrop.DraggableView;
@@ -238,7 +237,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
defaultIconSize = getResources().getDimensionPixelSize(
R.dimen.search_row_small_icon_size);
} else if (mDisplay == DISPLAY_TASKBAR) {
defaultIconSize = mDeviceProfile.iconSizePx;
defaultIconSize = mDeviceProfile.taskbarIconSize;
} else {
// widget_selection or shortcut_popup
defaultIconSize = mDeviceProfile.iconSizePx;