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

Commit 794fe4f5 authored by Tony Wickham's avatar Tony Wickham
Browse files

Add Hotseat items to Taskbar

- Currently supports WorkspaceItemInfo (e.g. normal app icons
  including hotseat predictions and pinned deep shortcuts).
- Currently doesn't support Folders, Notification dots, or
  long press.

Some technical details:
- Always allow HotseatPredictionController updates given the
  Hotseat is always showing even when Launcher is stopped.
- Represent Taskbar Hotseat items as BubbleTextViews, to
  allow for normal click handling etc. When the hotseat is
  updated, we reuse the same BubbleTextViews that were
  initially inflated, and just reapply the new info.
- Add new BubbleTextView iconDisplay for Taskbar, to allow
  for different treatment such as icon size.

Bug: 171917176
Change-Id: I325eb39051f2dc69228b39b5c40ed0cbdad8e200
parent 5f7f4cb3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@
        android:id="@+id/taskbar_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@color/taskbar_background"/>
        android:background="@color/taskbar_background"
        android:gravity="center"
        android:animateLayoutChanges="true"/>

</com.android.launcher3.taskbar.TaskbarContainerView>
 No newline at end of file
+17 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.views.DoubleShadowBubbleTextView style="@style/BaseIcon.Workspace.Taskbar" />
+17 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2021 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.uioverrides.PredictedAppIcon style="@style/BaseIcon.Workspace.Taskbar" />
+3 −0
Original line number Diff line number Diff line
@@ -122,4 +122,7 @@

    <!-- Taskbar -->
    <dimen name="taskbar_size">48dp</dimen>
    <dimen name="taskbar_icon_size">32dp</dimen>
    <!-- Note that this applies to both sides of all icons, so visible space is double this. -->
    <dimen name="taskbar_icon_spacing">14dp</dimen>
</resources>
+6 −0
Original line number Diff line number Diff line
@@ -85,4 +85,10 @@
        <item name="android:drawablePadding">8dp</item>
        <item name="android:textAllCaps">false</item>
    </style>

    <!-- Icon displayed on the taskbar -->
    <style name="BaseIcon.Workspace.Taskbar" >
        <item name="iconDisplay">taskbar</item>
        <item name="iconSizeOverride">@dimen/taskbar_icon_size</item>
    </style>
</resources>
 No newline at end of file
Loading