mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Creates a new view for the taskbar overflow button that draws up to 4
recent item previews. The items are stacked on top of each other in
counter clockwise order, with overlapping bounds, recent items closer
to the top. The item icons have a 2 dip ring around them, of the taskbar
background color.
Adjusts logic to calculate which items become part of the overflow
button, so more recent items get shown in the taskbar.
Initial consideration was to usse FolderIcon to represent the overflow
button, but decided against it because:
* FolderIcon is fairly entangled with the associated folder view
* item information uses different data structure (ItemInfo) than
recent items (GroupTasks)
* item preview layout within the main icon is similar, but
sufficiently different that using clipped folder layout rules felt
like hacking around assumptions made for folder icon UI
Bug: 368119679
Test: Keep opening apps until the task bar enters overflow - verify that
overview button shows up, and contains least recent task
representations. Keep adding items, then closing windows, and verify
the icon gets updated accordingly. Done in landscape and portrait, and
ltr and rtl layout.
Flag: com.android.launcher3.taskbar_overflow
Change-Id: I2824cb0db1f7516ebd74361ce00fb8887857325d
23 lines
1.1 KiB
XML
23 lines
1.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2024 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.
|
|
-->
|
|
|
|
<!-- Note: The actual size will match the taskbar icon sizes in TaskbarView#onLayout(). -->
|
|
<com.android.launcher3.taskbar.TaskbarOverflowView 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:backgroundTint="@android:color/transparent"
|
|
android:contentDescription="@string/taskbar_overflow_a11y_title" />
|