Taskbar layout update
> Calculating the hotseat padding statically
> Animating taskbar views individually when animating to home
instead of a layout animation
> Moving all navbar buttons to a separate layout/controller and independent
of Launcher
> Fixing RTL layout for taskbar and nav bar
Bug: 187353581
Test: Manual
Change-Id: If21696f38beee328f553e467394776a8e8ed4c3e
diff --git a/quickstep/res/layout/taskbar.xml b/quickstep/res/layout/taskbar.xml
index d32c115..d61a895 100644
--- a/quickstep/res/layout/taskbar.xml
+++ b/quickstep/res/layout/taskbar.xml
@@ -13,12 +13,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<com.android.launcher3.taskbar.TaskbarDragLayer
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/taskbar_container"
android:layout_width="wrap_content"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:clipChildren="false">
<com.android.launcher3.taskbar.TaskbarView
android:id="@+id/taskbar_view"
@@ -26,39 +26,32 @@
android:layout_height="wrap_content"
android:gravity="center"
android:forceHasOverlappingRendering="false"
+ android:layout_gravity="bottom"
+ android:clipChildren="false" />
+
+ <FrameLayout
+ android:id="@+id/navbuttons_view"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
android:layout_gravity="bottom" >
<LinearLayout
- android:id="@+id/nav_button_layout"
+ android:id="@+id/start_nav_buttons"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:paddingLeft="@dimen/taskbar_nav_buttons_spacing"
android:paddingRight="@dimen/taskbar_nav_buttons_spacing"
- android:forceHasOverlappingRendering="false"
- android:gravity="center" />
+ android:gravity="center_vertical"
+ android:layout_gravity="start"/>
- <LinearLayout
- android:id="@+id/hotseat_icons_layout"
+ <FrameLayout
+ android:id="@+id/end_nav_buttons"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:forceHasOverlappingRendering="false"
- android:gravity="center" />
-
- <LinearLayout
- android:id="@+id/contextual_button_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:paddingLeft="@dimen/taskbar_nav_buttons_spacing"
android:paddingRight="@dimen/taskbar_nav_buttons_spacing"
- android:forceHasOverlappingRendering="false"
- android:gravity="center" />
-
- </com.android.launcher3.taskbar.TaskbarView>
-
- <com.android.launcher3.taskbar.ImeBarView
- android:id="@+id/ime_bar_view"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone"/>
+ android:gravity="center_vertical"
+ android:layout_gravity="end"/>
+ </FrameLayout>
</com.android.launcher3.taskbar.TaskbarDragLayer>
\ No newline at end of file
diff --git a/quickstep/res/layout/taskbar_nav_button.xml b/quickstep/res/layout/taskbar_nav_button.xml
new file mode 100644
index 0000000..985f928
--- /dev/null
+++ b/quickstep/res/layout/taskbar_nav_button.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ImageView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="@dimen/taskbar_nav_buttons_size"
+ android:layout_height="@dimen/taskbar_nav_buttons_size"
+ android:background="@drawable/taskbar_icon_click_feedback_roundrect"
+ android:scaleType="center"/>
\ No newline at end of file
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index d9c33ae..d8899a6 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -148,11 +148,9 @@
<!-- Taskbar -->
<dimen name="taskbar_size">60dp</dimen>
- <dimen name="taskbar_icon_size">44dp</dimen>
<dimen name="taskbar_icon_touch_size">48dp</dimen>
<dimen name="taskbar_icon_drag_icon_size">54dp</dimen>
- <!-- Note that this applies to both sides of all icons, so visible space is double this. -->
- <dimen name="taskbar_icon_spacing">8dp</dimen>
<dimen name="taskbar_folder_margin">16dp</dimen>
<dimen name="taskbar_nav_buttons_spacing">16dp</dimen>
+ <dimen name="taskbar_nav_buttons_size">48dp</dimen>
</resources>