Loading packages/SystemUI/res/values-sw600dp/dimens.xml +6 −0 Original line number Diff line number Diff line Loading @@ -95,4 +95,10 @@ <dimen name="navigation_key_padding">25dp</dimen> <dimen name="qs_expand_margin">0dp</dimen> <!-- The top padding for the task stack. --> <dimen name="recents_stack_top_padding">40dp</dimen> <!-- The side padding for the task stack. --> <dimen name="recents_stack_left_right_padding">64dp</dimen> </resources> packages/SystemUI/res/values/dimens.xml +8 −5 Original line number Diff line number Diff line Loading @@ -249,15 +249,15 @@ <!-- The height of the search bar space. --> <dimen name="recents_search_bar_space_height">64dp</dimen> <!-- The side padding for the task stack as a percentage of the width. --> <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.03333</item> <!-- The overscroll percentage allowed on the stack. --> <item name="recents_stack_overscroll_percentage" format="float" type="dimen">0.0875</item> <!-- The top offset for the task stack. --> <!-- The top padding for the task stack. --> <dimen name="recents_stack_top_padding">16dp</dimen> <!-- The side padding for the task stack. --> <dimen name="recents_stack_left_right_padding">16dp</dimen> <!-- The dimesnsions of the dismiss all recents button. --> <dimen name="recents_dismiss_all_button_size">48dp</dimen> Loading @@ -274,7 +274,10 @@ <dimen name="recents_stack_overscroll">24dp</dimen> <!-- The size of the peek area at the top of the stack. --> <dimen name="recents_layout_focused_peek_size">@dimen/recents_history_button_height</dimen> <dimen name="recents_layout_focused_top_peek_size">@dimen/recents_history_button_height</dimen> <!-- The size of the peek area at the bottom of the stack. --> <dimen name="recents_layout_focused_bottom_peek_size">@dimen/recents_history_button_height</dimen> <!-- The height of the history button. --> <dimen name="recents_history_button_height">48dp</dimen> Loading packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryView.java +1 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ public class RecentsHistoryView extends LinearLayout mRecyclerView = (RecyclerView) findViewById(R.id.list); mRecyclerView.setAdapter(mAdapter); mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); mRecyclerView.getItemAnimator().setRemoveDuration(100); ItemTouchHelper touchHelper = new ItemTouchHelper(mItemTouchHandler); touchHelper.attachToRecyclerView(mRecyclerView); } Loading packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java +41 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.recents.misc; import android.animation.Animator; import android.animation.AnimatorSet; import android.annotation.FloatRange; import android.graphics.Color; import android.graphics.Rect; import android.graphics.RectF; Loading Loading @@ -104,6 +105,46 @@ public class Utilities { return setOut; } /** * @return the clamped {@param value} between the provided {@param min} and {@param max}. */ public static float clamp(float value, float min, float max) { return Math.max(min, Math.min(max, value)); } /** * @return the clamped {@param value} between the provided {@param min} and {@param max}. */ public static int clamp(int value, int min, int max) { return Math.max(min, Math.min(max, value)); } /** * @return the clamped {@param value} between 0 and 1. */ public static float clamp01(float value) { return Math.max(0f, Math.min(1f, value)); } /** * Scales the {@param value} to be proportionally between the {@param min} and * {@param max} values. * * @param value must be between 0 and 1 */ public static float mapRange(@FloatRange(from=0.0,to=1.0) float value, float min, float max) { return min + (value * (max - min)); } /** * Scales the {@param value} proportionally from {@param min} and {@param max} to 0 and 1. * * @param value must be between {@param min} and {@param max} */ public static float unmapRange(float value, float min, float max) { return (value - min) / (max - min); } /** Scales a rect about its centroid */ public static void scaleRectAboutCenter(RectF r, float scale) { if (scale != 1.0f) { Loading packages/SystemUI/src/com/android/systemui/recents/model/TaskKeyLruCache.java +1 −1 Original line number Diff line number Diff line Loading @@ -96,6 +96,6 @@ public class TaskKeyLruCache<V> { /** Trims the cache to a specific size */ final void trimToSize(int cacheSize) { mCache.resize(cacheSize); mCache.trimToSize(cacheSize); } } Loading
packages/SystemUI/res/values-sw600dp/dimens.xml +6 −0 Original line number Diff line number Diff line Loading @@ -95,4 +95,10 @@ <dimen name="navigation_key_padding">25dp</dimen> <dimen name="qs_expand_margin">0dp</dimen> <!-- The top padding for the task stack. --> <dimen name="recents_stack_top_padding">40dp</dimen> <!-- The side padding for the task stack. --> <dimen name="recents_stack_left_right_padding">64dp</dimen> </resources>
packages/SystemUI/res/values/dimens.xml +8 −5 Original line number Diff line number Diff line Loading @@ -249,15 +249,15 @@ <!-- The height of the search bar space. --> <dimen name="recents_search_bar_space_height">64dp</dimen> <!-- The side padding for the task stack as a percentage of the width. --> <item name="recents_stack_width_padding_percentage" format="float" type="dimen">0.03333</item> <!-- The overscroll percentage allowed on the stack. --> <item name="recents_stack_overscroll_percentage" format="float" type="dimen">0.0875</item> <!-- The top offset for the task stack. --> <!-- The top padding for the task stack. --> <dimen name="recents_stack_top_padding">16dp</dimen> <!-- The side padding for the task stack. --> <dimen name="recents_stack_left_right_padding">16dp</dimen> <!-- The dimesnsions of the dismiss all recents button. --> <dimen name="recents_dismiss_all_button_size">48dp</dimen> Loading @@ -274,7 +274,10 @@ <dimen name="recents_stack_overscroll">24dp</dimen> <!-- The size of the peek area at the top of the stack. --> <dimen name="recents_layout_focused_peek_size">@dimen/recents_history_button_height</dimen> <dimen name="recents_layout_focused_top_peek_size">@dimen/recents_history_button_height</dimen> <!-- The size of the peek area at the bottom of the stack. --> <dimen name="recents_layout_focused_bottom_peek_size">@dimen/recents_history_button_height</dimen> <!-- The height of the history button. --> <dimen name="recents_history_button_height">48dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryView.java +1 −0 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ public class RecentsHistoryView extends LinearLayout mRecyclerView = (RecyclerView) findViewById(R.id.list); mRecyclerView.setAdapter(mAdapter); mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext())); mRecyclerView.getItemAnimator().setRemoveDuration(100); ItemTouchHelper touchHelper = new ItemTouchHelper(mItemTouchHandler); touchHelper.attachToRecyclerView(mRecyclerView); } Loading
packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java +41 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.recents.misc; import android.animation.Animator; import android.animation.AnimatorSet; import android.annotation.FloatRange; import android.graphics.Color; import android.graphics.Rect; import android.graphics.RectF; Loading Loading @@ -104,6 +105,46 @@ public class Utilities { return setOut; } /** * @return the clamped {@param value} between the provided {@param min} and {@param max}. */ public static float clamp(float value, float min, float max) { return Math.max(min, Math.min(max, value)); } /** * @return the clamped {@param value} between the provided {@param min} and {@param max}. */ public static int clamp(int value, int min, int max) { return Math.max(min, Math.min(max, value)); } /** * @return the clamped {@param value} between 0 and 1. */ public static float clamp01(float value) { return Math.max(0f, Math.min(1f, value)); } /** * Scales the {@param value} to be proportionally between the {@param min} and * {@param max} values. * * @param value must be between 0 and 1 */ public static float mapRange(@FloatRange(from=0.0,to=1.0) float value, float min, float max) { return min + (value * (max - min)); } /** * Scales the {@param value} proportionally from {@param min} and {@param max} to 0 and 1. * * @param value must be between {@param min} and {@param max} */ public static float unmapRange(float value, float min, float max) { return (value - min) / (max - min); } /** Scales a rect about its centroid */ public static void scaleRectAboutCenter(RectF r, float scale) { if (scale != 1.0f) { Loading
packages/SystemUI/src/com/android/systemui/recents/model/TaskKeyLruCache.java +1 −1 Original line number Diff line number Diff line Loading @@ -96,6 +96,6 @@ public class TaskKeyLruCache<V> { /** Trims the cache to a specific size */ final void trimToSize(int cacheSize) { mCache.resize(cacheSize); mCache.trimToSize(cacheSize); } }