diff options
Diffstat (limited to 'quickstep')
8 files changed, 17 insertions, 16 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java index 8ab2eb1b7..cbac944aa 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java @@ -35,6 +35,7 @@ import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.DeviceProfile; import com.android.launcher3.R; import com.android.launcher3.Utilities; +import com.android.launcher3.util.Themes; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.RecentsModel; import com.android.quickstep.views.RecentsView; @@ -101,9 +102,7 @@ public class ClipAnimationHelper { public ClipAnimationHelper(Context context) { mWindowCornerRadius = getWindowCornerRadius(context.getResources()); mSupportsRoundedCornersOnWindows = supportsRoundedCornersOnWindows(context.getResources()); - int taskCornerRadiusRes = mSupportsRoundedCornersOnWindows ? - R.dimen.task_corner_radius : R.dimen.task_corner_radius_small; - mTaskCornerRadius = context.getResources().getDimension(taskCornerRadiusRes); + mTaskCornerRadius = Themes.getDialogCornerRadius(context); } private void updateSourceStack(RemoteAnimationTargetCompat target) { diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java index d15a39263..c47e943be 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskMenuView.java @@ -40,6 +40,7 @@ import com.android.launcher3.R; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.Interpolators; import com.android.launcher3.anim.RoundedRectRevealOutlineProvider; +import com.android.launcher3.util.Themes; import com.android.launcher3.views.BaseDragLayer; import com.android.quickstep.TaskSystemShortcut; import com.android.quickstep.TaskUtils; @@ -270,7 +271,7 @@ public class TaskMenuView extends AbstractFloatingView { } private RoundedRectRevealOutlineProvider createOpenCloseOutlineProvider() { - float radius = getResources().getDimension(R.dimen.task_corner_radius); + float radius = Themes.getDialogCornerRadius(getContext()); Rect fromRect = new Rect(0, 0, getWidth(), 0); Rect toRect = new Rect(0, 0, getWidth(), getHeight()); return new RoundedRectRevealOutlineProvider(radius, radius, fromRect, toRect); diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java index 10533ac3a..790523022 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java @@ -108,7 +108,7 @@ public class TaskThumbnailView extends View { public TaskThumbnailView(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); - mCornerRadius = getResources().getDimension(R.dimen.task_corner_radius); + mCornerRadius = Themes.getDialogCornerRadius(context); mOverlay = TaskOverlayFactory.INSTANCE.get(context).createOverlay(this); mPaint.setFilterBitmap(true); mBackgroundPaint.setColor(Color.WHITE); diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java index bea705f81..ec0112d52 100644 --- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java @@ -52,6 +52,7 @@ import com.android.launcher3.anim.Interpolators; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.util.PendingAnimation; +import com.android.launcher3.util.Themes; import com.android.launcher3.util.ViewPool.Reusable; import com.android.quickstep.RecentsModel; import com.android.quickstep.TaskIconCache; @@ -196,7 +197,7 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { fromContext(context).getStatsLogManager().logTaskLaunch(getRecentsView(), TaskUtils.getLaunchComponentKeyForTask(getTask().key)); }); - setOutlineProvider(new TaskOutlineProvider(getResources())); + setOutlineProvider(new TaskOutlineProvider(context, getResources())); } @Override @@ -514,9 +515,9 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { private final int mMarginTop; private final float mRadius; - TaskOutlineProvider(Resources res) { + TaskOutlineProvider(Context context, Resources res) { mMarginTop = res.getDimensionPixelSize(R.dimen.task_thumbnail_top_margin); - mRadius = res.getDimension(R.dimen.task_corner_radius); + mRadius = Themes.getDialogCornerRadius(context); } @Override diff --git a/quickstep/res/drawable/bg_wellbeing_toast.xml b/quickstep/res/drawable/bg_wellbeing_toast.xml index 22d6f8aa7..65730f6cc 100644 --- a/quickstep/res/drawable/bg_wellbeing_toast.xml +++ b/quickstep/res/drawable/bg_wellbeing_toast.xml @@ -15,5 +15,5 @@ --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#E61A73E8" /> - <corners android:radius="@dimen/task_corner_radius" /> + <corners android:radius="?android:attr/dialogCornerRadius" /> </shape>
\ No newline at end of file diff --git a/quickstep/res/drawable/task_menu_bg.xml b/quickstep/res/drawable/task_menu_bg.xml index d5597a9db..7334d984f 100644 --- a/quickstep/res/drawable/task_menu_bg.xml +++ b/quickstep/res/drawable/task_menu_bg.xml @@ -28,8 +28,8 @@ <!-- Background --> <shape> <corners - android:topLeftRadius="@dimen/task_corner_radius" - android:topRightRadius="@dimen/task_corner_radius" + android:topLeftRadius="?android:attr/dialogCornerRadius" + android:topRightRadius="?android:attr/dialogCornerRadius" android:bottomLeftRadius="0dp" android:bottomRightRadius="0dp" /> <solid android:color="?attr/popupColorPrimary" /> diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml index 97f2de762..6cbadda38 100644 --- a/quickstep/res/values/dimens.xml +++ b/quickstep/res/values/dimens.xml @@ -19,9 +19,7 @@ <dimen name="task_thumbnail_top_margin">24dp</dimen> <dimen name="task_thumbnail_half_top_margin">12dp</dimen> <dimen name="task_thumbnail_icon_size">48dp</dimen> - <dimen name="task_corner_radius">8dp</dimen> - <!-- For screens without rounded corners --> - <dimen name="task_corner_radius_small">2dp</dimen> + <dimen name="recents_page_spacing">10dp</dimen> <dimen name="recents_clear_all_deadzone_vertical_margin">70dp</dimen> <dimen name="overview_peek_distance">32dp</dimen> @@ -61,7 +59,6 @@ docked_stack_divider_thickness - 2 * docked_stack_divider_insets --> <dimen name="multi_window_task_divider_size">10dp</dimen> - <dimen name="shelf_surface_radius">16dp</dimen> <!-- same as vertical_drag_handle_size --> <dimen name="shelf_surface_offset">24dp</dimen> diff --git a/quickstep/src/com/android/quickstep/views/ShelfScrimView.java b/quickstep/src/com/android/quickstep/views/ShelfScrimView.java index d74e880a2..36521e5cc 100644 --- a/quickstep/src/com/android/quickstep/views/ShelfScrimView.java +++ b/quickstep/src/com/android/quickstep/views/ShelfScrimView.java @@ -53,6 +53,9 @@ public class ShelfScrimView extends ScrimView implements NavigationModeChangeLis // cover the whole screen private static final float SCRIM_CATCHUP_THRESHOLD = 0.2f; + // Temporarily needed until android.R.attr.bottomDialogCornerRadius becomes public + private static final float BOTTOM_CORNER_RADIUS_RATIO = 2f; + // In transposed layout, we simply draw a flat color. private boolean mDrawingFlatColor; @@ -87,7 +90,7 @@ public class ShelfScrimView extends ScrimView implements NavigationModeChangeLis mMaxScrimAlpha = Math.round(OVERVIEW.getWorkspaceScrimAlpha(mLauncher) * 255); mEndAlpha = Color.alpha(mEndScrim); - mRadius = mLauncher.getResources().getDimension(R.dimen.shelf_surface_radius); + mRadius = BOTTOM_CORNER_RADIUS_RATIO * Themes.getDialogCornerRadius(context); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mShelfOffset = context.getResources().getDimension(R.dimen.shelf_surface_offset); |