NIU Actions and Recents UI updates on Go

This tweaks the layout and fonts in the Go Overview. It also adds rounded corners to the task snapshots in the Recents view on Go by adding an overrideable value to the base Quickstep Launcher.

Bug: 186004471
Test: Manual (Pixel 3A)
Change-Id: I220836a95a6416b85bdb71d88822d25d939cf205
This commit is contained in:
Jon Spivack
2021-05-14 19:02:36 -07:00
parent 890240f470
commit f90db8a8eb
5 changed files with 25 additions and 5 deletions
@@ -24,10 +24,14 @@
<LinearLayout
android:id="@+id/action_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/overview_actions_height"
android:layout_gravity="top|center_horizontal"
android:orientation="horizontal">
<Space
android:layout_width="@dimen/go_overview_button_width"
android:layout_height="1dp" />
<Space
android:layout_width="0dp"
android:layout_height="1dp"
@@ -86,6 +90,10 @@
android:layout_height="1dp"
android:layout_weight="1" />
<Space
android:layout_width="@dimen/go_overview_button_width"
android:layout_height="1dp" />
<!-- Will be enabled in a future version. -->
<LinearLayout
style="@style/GoOverviewActionButtonContainer"
+4
View File
@@ -23,4 +23,8 @@
<dimen name="go_overview_button_height">60dp</dimen>
<dimen name="go_overview_button_container_width">80dp</dimen>
<dimen name="go_overview_button_caption_margin">8dp</dimen>
<dimen name="overview_actions_height">96dp</dimen>
<dimen name="overview_proactive_row_height">0dp</dimen>
<dimen name="overview_proactive_row_bottom_margin">24dp</dimen>
<dimen name="task_corner_radius_override">28dp</dimen>
</resources>
+1 -1
View File
@@ -25,7 +25,7 @@
</style>
<style name="GoOverviewActionButtonCaption">
<item name="android:fontFamily">roboto-medium</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textSize">14dp</item>
<item name="android:textColor">@color/go_overview_button_icon_color</item>
<item name="android:lineHeight">20dp</item>
+2
View File
@@ -19,6 +19,8 @@
<dimen name="task_thumbnail_icon_size_grid">32dp</dimen>
<!-- For screens without rounded corners -->
<dimen name="task_corner_radius_small">2dp</dimen>
<!-- For Launchers that want to override the default dialog corner radius -->
<dimen name="task_corner_radius_override">-1dp</dimen>
<dimen name="overview_proactive_row_height">48dp</dimen>
<dimen name="overview_proactive_row_bottom_margin">16dp</dimen>
@@ -18,6 +18,7 @@ package com.android.quickstep.util;
import static com.android.systemui.shared.system.QuickStepContract.supportsRoundedCornersOnWindows;
import android.content.Context;
import android.content.res.Resources;
import com.android.launcher3.R;
import com.android.launcher3.util.Themes;
@@ -25,8 +26,13 @@ import com.android.launcher3.util.Themes;
public class TaskCornerRadius {
public static float get(Context context) {
return supportsRoundedCornersOnWindows(context.getResources()) ?
Themes.getDialogCornerRadius(context):
context.getResources().getDimension(R.dimen.task_corner_radius_small);
Resources resources = context.getResources();
if (!supportsRoundedCornersOnWindows(resources)) {
return resources.getDimension(R.dimen.task_corner_radius_small);
}
float overriddenRadius =
resources.getDimension(R.dimen.task_corner_radius_override);
return (overriddenRadius > 0) ? overriddenRadius : Themes.getDialogCornerRadius(context);
}
}