Merge "Renaming TaskbarController to LauncherTaskbarUIController" into sc-dev am: 749f55f07a am: f6a895edad
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14626089
Change-Id: Ib7e7d00556752123e313b543f27b5a01ce070e5b
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index 420c145..72a37fc 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -16,7 +16,7 @@
<resources>
<dimen name="task_thumbnail_icon_size">48dp</dimen>
- <dimen name="task_thumbnail_icon_size_grid">32dp</dimen>
+ <dimen name="task_thumbnail_icon_size_grid">40dp</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 -->
@@ -35,10 +35,10 @@
<dimen name="overview_actions_horizontal_margin">16dp</dimen>
<dimen name="overview_grid_top_margin">77dp</dimen>
- <dimen name="overview_grid_bottom_margin">90dp</dimen>
+ <dimen name="overview_grid_bottom_margin">70dp</dimen>
<dimen name="overview_grid_side_margin">54dp</dimen>
<dimen name="overview_grid_row_spacing">42dp</dimen>
- <dimen name="overview_grid_focus_vertical_margin">90dp</dimen>
+ <dimen name="overview_grid_focus_vertical_margin">40dp</dimen>
<dimen name="split_placeholder_size">110dp</dimen>
<!-- These speeds are in dp/s -->
diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
index 86bf119..270a790 100644
--- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java
@@ -197,17 +197,18 @@
Rect gridRect = new Rect();
calculateGridSize(context, dp, gridRect);
- int verticalMargin = res.getDimensionPixelSize(
- R.dimen.overview_grid_focus_vertical_margin);
- float taskHeight = gridRect.height() - verticalMargin * 2;
+ int verticalMargin = Math.max(
+ res.getDimensionPixelSize(R.dimen.overview_grid_focus_vertical_margin),
+ res.getDimensionPixelSize(R.dimen.overview_actions_height));
+ float taskHeight =
+ gridRect.height() - verticalMargin * 2 - dp.overviewTaskThumbnailTopMarginPx;
PointF taskDimension = getTaskDimension(context, dp);
- float scale = taskHeight / Math.max(taskDimension.x, taskDimension.y);
+ float scale = taskHeight / taskDimension.y;
int outWidth = Math.round(scale * taskDimension.x);
int outHeight = Math.round(scale * taskDimension.y);
- int gravity = Gravity.CENTER_VERTICAL;
- gravity |= orientedState.getRecentsRtlSetting(res) ? Gravity.RIGHT : Gravity.LEFT;
+ int gravity = Gravity.CENTER;
Gravity.apply(gravity, outWidth, outHeight, gridRect, outRect);
} else {
int taskMargin = dp.overviewTaskMarginPx;
@@ -296,8 +297,7 @@
float rowHeight = (gridRect.height() - rowSpacing) / 2f;
PointF taskDimension = getTaskDimension(context, dp);
- float scale = (rowHeight - dp.overviewTaskThumbnailTopMarginPx) / Math.max(
- taskDimension.x, taskDimension.y);
+ float scale = (rowHeight - dp.overviewTaskThumbnailTopMarginPx) / taskDimension.y;
int outWidth = Math.round(scale * taskDimension.x);
int outHeight = Math.round(scale * taskDimension.y);
diff --git a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
index c06e9a9..4ec1c15 100644
--- a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
+++ b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
@@ -231,7 +231,7 @@
@Override
public SystemShortcut getShortcut(BaseDraggingActivity activity, TaskView taskView) {
SystemShortcut shortcut = super.getShortcut(activity, taskView);
- if (FeatureFlags.ENABLE_SPLIT_SELECT.get()) {
+ if (shortcut != null && FeatureFlags.ENABLE_SPLIT_SELECT.get()) {
// Disable if there's only one recent app for split screen
shortcut.setEnabled(taskView.getRecentsView().getTaskViewCount() > 1);
}
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 376cb31..25e850c 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -487,7 +487,6 @@
protected boolean mRunningTaskTileHidden;
private Task mTmpRunningTask;
protected int mFocusedTaskId = -1;
- private float mFocusedTaskRatio;
private boolean mRunningTaskIconScaledDown = false;
@@ -1351,19 +1350,7 @@
public Point getSelectedTaskSize() {
mSizeStrategy.calculateTaskSize(mActivity, mActivity.getDeviceProfile(), mTempRect,
mOrientationHandler);
- int taskWidth = mTempRect.width();
- int taskHeight = mTempRect.height();
- if (mRunningTaskId != -1) {
- int boxLength = Math.max(taskWidth, taskHeight);
- if (mFocusedTaskRatio > 1) {
- taskWidth = boxLength;
- taskHeight = (int) (boxLength / mFocusedTaskRatio);
- } else {
- taskWidth = (int) (boxLength * mFocusedTaskRatio);
- taskHeight = boxLength;
- }
- }
- return new Point(taskWidth, taskHeight);
+ return new Point(mTempRect.width(), mTempRect.height());
}
/** Gets the last computed task size */
@@ -1593,13 +1580,6 @@
}
/**
- * Returns the width to height ratio of the focused {@link TaskView}.
- */
- public float getFocusedTaskRatio() {
- return mFocusedTaskRatio;
- }
-
- /**
* Get the index of the task view whose id matches {@param taskId}.
* @return -1 if there is no task view for the task id, else the index of the task view.
*/
@@ -1778,7 +1758,7 @@
int runningTaskId = runningTaskInfo == null ? -1 : runningTaskInfo.taskId;
setCurrentTask(runningTaskId);
if (mActivity.getDeviceProfile().isTablet && FeatureFlags.ENABLE_OVERVIEW_GRID.get()) {
- setFocusedTask(runningTaskId);
+ mFocusedTaskId = runningTaskId;
}
setCurrentPage(getRunningTaskIndex());
setRunningTaskViewShowScreenshot(false);
@@ -1808,15 +1788,6 @@
}
/**
- * Sets the focused task id and store the width to height ratio of the focused task.
- */
- protected void setFocusedTask(int focusedTaskId) {
- mFocusedTaskId = focusedTaskId;
- mFocusedTaskRatio =
- mLastComputedTaskSize.width() / (float) mLastComputedTaskSize.height();
- }
-
- /**
* Hides the tile associated with {@link #mRunningTaskId}
*/
public void setRunningTaskHidden(boolean isHidden) {
@@ -1905,8 +1876,6 @@
return;
}
- final int boxLength = Math.max(mLastComputedGridTaskSize.width(),
- mLastComputedGridTaskSize.height());
int taskTopMargin = mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx;
/*
@@ -1917,7 +1886,8 @@
*/
final float taskGridVerticalDiff =
mLastComputedGridTaskSize.top - mLastComputedTaskSize.top;
- final float heightOffset = (boxLength + taskTopMargin) + mRowSpacing;
+ final float heightOffset =
+ (mLastComputedGridTaskSize.height() + taskTopMargin) + mRowSpacing;
int topRowWidth = 0;
int bottomRowWidth = 0;
@@ -2061,20 +2031,9 @@
float clearAllShorterRowCompensation =
mIsRtl ? -shorterRowCompensation : shorterRowCompensation;
- // If the total width is shorter than one grid's width, move ClearAllButton further away
- // accordingly. Update longRowWidth if ClearAllButton has been moved.
- float clearAllShortTotalCompensation = 0;
- int longRowWidth = Math.max(topRowWidth, bottomRowWidth);
- if (longRowWidth < mLastComputedGridSize.width()) {
- float shortTotalCompensation = mLastComputedGridSize.width() - longRowWidth;
- clearAllShortTotalCompensation =
- mIsRtl ? -shortTotalCompensation : shortTotalCompensation;
- longRowWidth = mLastComputedGridSize.width();
- }
-
float clearAllTotalTranslationX =
clearAllAccumulatedTranslation + clearAllShorterRowCompensation
- + clearAllShortTotalCompensation + snappedTaskFullscreenScrollAdjustment;
+ + snappedTaskFullscreenScrollAdjustment;
if (focusedTaskIndex < taskCount) {
// Shift by focused task's width and spacing if a task is focused.
clearAllTotalTranslationX +=
@@ -2084,9 +2043,12 @@
// Make sure there are enough space between snapped page and ClearAllButton, for the case
// of swiping up after quick switch.
if (snappedTaskView != null) {
+ int longRowWidth = Math.max(topRowWidth, bottomRowWidth);
int distanceFromClearAll = longRowWidth - snappedTaskRowWidth;
+ // ClearAllButton should be off screen when snapped task is in its snapped position.
int minimumDistance =
- mLastComputedGridSize.width() - snappedTaskView.getLayoutParams().width;
+ mTaskWidth - snappedTaskView.getLayoutParams().width
+ + (mLastComputedGridSize.width() - mTaskWidth) / 2;
if (distanceFromClearAll < minimumDistance) {
int distanceDifference = minimumDistance - distanceFromClearAll;
clearAllTotalTranslationX += mIsRtl ? -distanceDifference : distanceDifference;
diff --git a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
index 02888a1..1bfd430 100644
--- a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
@@ -411,7 +411,9 @@
*/
public static class PreviewPositionHelper {
- // Contains the portion of the thumbnail that is clipped when fullscreen progress = 0.
+ private static final RectF EMPTY_RECT_F = new RectF();
+
+ // Contains the portion of the thumbnail that is unclipped when fullscreen progress = 1.
private final RectF mClippedInsets = new RectF();
private final Matrix mMatrix = new Matrix();
private boolean mIsOrientationChanged;
@@ -616,15 +618,17 @@
break;
}
mClippedInsets.offsetTo(newLeftInset * scale, newTopInset * scale);
- mMatrix.postTranslate(translateX - mClippedInsets.left,
- translateY - mClippedInsets.top);
+ mMatrix.postTranslate(translateX, translateY);
+ if (TaskView.FULL_THUMBNAIL) {
+ mMatrix.postTranslate(-mClippedInsets.left, -mClippedInsets.top);
+ }
}
/**
* Insets to used for clipping the thumbnail (in case it is drawing outside its own space)
*/
public RectF getInsetsToDrawInFullscreen() {
- return mClippedInsets;
+ return TaskView.FULL_THUMBNAIL ? mClippedInsets : EMPTY_RECT_F;
}
}
}
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index cfac32c..55a32ea 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -141,6 +141,11 @@
*/
public static final boolean CLIP_STATUS_AND_NAV_BARS = false;
+ /**
+ * Should the TaskView scale down to fit whole thumbnail in fullscreen.
+ */
+ public static final boolean FULL_THUMBNAIL = false;
+
private static final float EDGE_SCALE_DOWN_FACTOR_CAROUSEL = 0.03f;
private static final float EDGE_SCALE_DOWN_FACTOR_GRID = 0.00f;
@@ -1343,46 +1348,26 @@
int boxWidth;
int boxHeight;
- float thumbnailRatio;
boolean isFocusedTask = isFocusedTask();
if (isFocusedTask) {
// Task will be focused and should use focused task size. Use focusTaskRatio
// that is associated with the original orientation of the focused task.
boxWidth = taskWidth;
boxHeight = taskHeight;
- thumbnailRatio = getRecentsView().getFocusedTaskRatio();
} else {
// Otherwise task is in grid, and should use lastComputedGridTaskSize.
Rect lastComputedGridTaskSize = getRecentsView().getLastComputedGridTaskSize();
boxWidth = lastComputedGridTaskSize.width();
boxHeight = lastComputedGridTaskSize.height();
- thumbnailRatio = mTask != null ? mTask.getVisibleThumbnailRatio(
- TaskView.CLIP_STATUS_AND_NAV_BARS) : 0f;
}
- int boxLength = Math.max(boxWidth, boxHeight);
// Bound width/height to the box size.
- if (thumbnailRatio == 0f) {
- expectedWidth = boxWidth;
- expectedHeight = boxHeight + thumbnailPadding;
- } else if (thumbnailRatio > 1) {
- expectedWidth = boxLength;
- expectedHeight = (int) (boxLength / thumbnailRatio) + thumbnailPadding;
- } else {
- expectedWidth = (int) (boxLength * thumbnailRatio);
- expectedHeight = boxLength + thumbnailPadding;
- }
+ expectedWidth = boxWidth;
+ expectedHeight = boxHeight + thumbnailPadding;
// Scale to to fit task Rect.
fullscreenScale = taskWidth / (float) boxWidth;
- // In full screen, scale back TaskView to original size.
- if (expectedWidth > boxWidth) {
- fullscreenScale *= boxWidth / (float) expectedWidth;
- } else if (expectedHeight - thumbnailPadding > boxHeight) {
- fullscreenScale *= boxHeight / (float) (expectedHeight - thumbnailPadding);
- }
-
// Align to top of task Rect.
boxTranslationY = (expectedHeight - thumbnailPadding - taskHeight) / 2.0f;
} else {
diff --git a/res/drawable/all_apps_tabs_background.xml b/res/drawable/all_apps_tabs_background.xml
index 377b653..f882522 100644
--- a/res/drawable/all_apps_tabs_background.xml
+++ b/res/drawable/all_apps_tabs_background.xml
@@ -13,9 +13,14 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<shape android:shape="rectangle"
- xmlns:android="http://schemas.android.com/apk/res/android"
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
- <solid android:color="?androidprv:attr/colorSurface" />
- <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
-</shape>
\ No newline at end of file
+ <item
+ android:top="6dp"
+ android:bottom="6dp">
+ <shape android:shape="rectangle">
+ <solid android:color="?androidprv:attr/colorSurface" />
+ <corners android:radius="@dimen/all_apps_header_pill_corner_radius" />
+ </shape>
+ </item>
+</layer-list>
\ No newline at end of file
diff --git a/res/layout/all_apps_personal_work_tabs.xml b/res/layout/all_apps_personal_work_tabs.xml
index f089f83..686dda8 100644
--- a/res/layout/all_apps_personal_work_tabs.xml
+++ b/res/layout/all_apps_personal_work_tabs.xml
@@ -16,11 +16,10 @@
<com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabs"
- android:layout_width="match_parent"
+ android:layout_width="@dimen/all_apps_header_pills_width"
android:layout_height="@dimen/all_apps_header_pill_height"
+ android:layout_gravity="center_horizontal"
android:background="@drawable/all_apps_tabs_background"
- android:layout_marginLeft="@dimen/all_apps_tabs_side_padding"
- android:layout_marginRight="@dimen/all_apps_tabs_side_padding"
android:orientation="horizontal"
android:elevation="2dp"
style="@style/TextHeadline">
diff --git a/res/layout/secondary_launcher.xml b/res/layout/secondary_launcher.xml
index 94fcdb9..b15a320 100644
--- a/res/layout/secondary_launcher.xml
+++ b/res/layout/secondary_launcher.xml
@@ -71,8 +71,6 @@
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="@dimen/all_apps_header_pill_height"
- android:layout_marginLeft="@dimen/all_apps_tabs_side_padding"
- android:layout_marginRight="@dimen/all_apps_tabs_side_padding"
android:orientation="horizontal"
style="@style/TextHeadline">
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index e605ca8..dc33ab8 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -19,6 +19,7 @@
<!-- Attributes used for launcher theme -->
<attr name="allAppsScrimColor" format="color" />
+ <attr name="allappsHeaderProtectionColor" format="color" />
<attr name="allAppsNavBarScrimColor" format="color" />
<attr name="allAppsTheme" format="reference" />
<attr name="popupColorPrimary" format="color" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index ae55485..2669437 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -17,7 +17,8 @@
** limitations under the License.
*/
-->
-<resources>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
<!-- The color tints to apply to the text and drag view when hovering
over the delete target or the info target -->
<color name="delete_target_hover_tint">#FFC1C1C1</color>
@@ -61,5 +62,4 @@
<color name="wallpaper_popup_scrim">?android:attr/colorAccent</color>
<color name="wallpaper_scrim_color">#0D878787</color>
-
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 451f82b..bfa02c0 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -91,7 +91,7 @@
<dimen name="all_apps_empty_search_bg_top_offset">144dp</dimen>
<dimen name="all_apps_background_canvas_width">700dp</dimen>
<dimen name="all_apps_background_canvas_height">475dp</dimen>
- <dimen name="all_apps_header_pill_height">36dp</dimen>
+ <dimen name="all_apps_header_pill_height">48dp</dimen>
<dimen name="all_apps_header_pill_corner_radius">18dp</dimen>
<dimen name="all_apps_header_pills_width">320dp</dimen>
<dimen name="all_apps_header_tab_height">48dp</dimen>
@@ -99,7 +99,7 @@
<dimen name="all_apps_header_top_padding">36dp</dimen>
<dimen name="all_apps_work_profile_tab_footer_top_padding">16dp</dimen>
<dimen name="all_apps_work_profile_tab_footer_bottom_padding">20dp</dimen>
- <dimen name="all_apps_tabs_side_padding">32dp</dimen>
+ <dimen name="all_apps_tabs_vertical_padding">6dp</dimen>
<dimen name="all_apps_divider_height">1dp</dimen>
<dimen name="all_apps_tip_bottom_margin">8dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c668b0c..df617ea 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -33,6 +33,7 @@
<style name="LauncherTheme" parent="@style/BaseLauncherTheme">
<item name="android:textColorSecondary">#DE000000</item>
<item name="allAppsScrimColor">?android:attr/colorBackgroundFloating</item>
+ <item name="allappsHeaderProtectionColor">@color/popup_color_tertiary_light</item>
<item name="allAppsNavBarScrimColor">#66FFFFFF</item>
<item name="allAppsTheme">@style/AllAppsTheme</item>
<item name="popupColorPrimary">@color/popup_color_primary_light</item>
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index 9df95bf..18de49a 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -127,7 +127,6 @@
private Rect mInsets = new Rect();
private SearchAdapterProvider mSearchAdapterProvider;
- private final int mHeaderTopPadding;
private final int mScrimColor;
private final int mHeaderProtectionColor;
private final float mHeaderThreshold;
@@ -152,9 +151,7 @@
mScrimColor = Themes.getAttrColor(context, R.attr.allAppsScrimColor);
mHeaderThreshold = getResources().getDimensionPixelSize(
R.dimen.dynamic_grid_cell_border_spacing);
- mHeaderTopPadding = context.getResources()
- .getDimensionPixelSize(R.dimen.all_apps_header_top_padding);
- mHeaderProtectionColor = context.getColor(R.color.all_apps_tab_bg);
+ mHeaderProtectionColor = Themes.getAttrColor(context, R.attr.allappsHeaderProtectionColor);
mLauncher.addOnDeviceProfileChangeListener(this);
diff --git a/src/com/android/launcher3/allapps/FloatingHeaderView.java b/src/com/android/launcher3/allapps/FloatingHeaderView.java
index f55ab25..af7896a 100644
--- a/src/com/android/launcher3/allapps/FloatingHeaderView.java
+++ b/src/com/android/launcher3/allapps/FloatingHeaderView.java
@@ -52,6 +52,7 @@
private final Rect mClip = new Rect(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE);
private final ValueAnimator mAnimator = ValueAnimator.ofInt(0, 0);
+ private final ValueAnimator mHeaderAnimator = ValueAnimator.ofInt(0, 1).setDuration(100);
private final Point mTempOffset = new Point();
private final Paint mBGPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private final RecyclerView.OnScrollListener mOnScrollListener =
@@ -132,6 +133,7 @@
}
mFixedRows = rows.toArray(new FloatingHeaderRow[rows.size()]);
mAllRows = mFixedRows;
+ mHeaderAnimator.addUpdateListener(valueAnimator -> invalidate());
}
@Override
@@ -268,7 +270,6 @@
}
} else {
mHeaderCollapsed = false;
- invalidate();
}
mTranslationY = currentScrollY;
} else if (!mHeaderCollapsed) {
@@ -281,7 +282,8 @@
} else if (mTranslationY <= -mMaxTranslation) { // hide or stay hidden
mHeaderCollapsed = true;
mSnappedScrolledY = -mMaxTranslation;
- invalidate();
+ mHeaderAnimator.setCurrentFraction(0);
+ mHeaderAnimator.start();
}
}
}
@@ -296,8 +298,10 @@
@Override
protected void dispatchDraw(Canvas canvas) {
- if (mHeaderCollapsed && mHeaderColor != Color.TRANSPARENT) {
+ if (mHeaderCollapsed && mTabLayout.getVisibility() == VISIBLE
+ && mHeaderColor != Color.TRANSPARENT) {
mBGPaint.setColor(mHeaderColor);
+ mBGPaint.setAlpha((int) (255 * mHeaderAnimator.getAnimatedFraction()));
canvas.drawRect(0, 0, getWidth(), getHeight() + mTranslationY, mBGPaint);
}
super.dispatchDraw(canvas);
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 0c0c92e..1715161 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -214,14 +214,14 @@
+ "predictions to be updated while they are visible to the user.");
public static final BooleanFlag ENABLE_TASKBAR = getDebugFlag(
- "ENABLE_TASKBAR", false, "Allows a system Taskbar to be shown on larger devices.");
+ "ENABLE_TASKBAR", true, "Allows a system Taskbar to be shown on larger devices.");
public static final BooleanFlag ENABLE_OVERVIEW_GRID = getDebugFlag(
- "ENABLE_OVERVIEW_GRID", false, "Uses grid overview layout. "
+ "ENABLE_OVERVIEW_GRID", true, "Uses grid overview layout. "
+ "Only applicable on large screen devices.");
public static final BooleanFlag ENABLE_TWO_PANEL_HOME = getDebugFlag(
- "ENABLE_TWO_PANEL_HOME", false,
+ "ENABLE_TWO_PANEL_HOME", true,
"Uses two panel on home screen. Only applicable on large screen devices.");
public static final BooleanFlag ENABLE_SPLIT_SELECT = getDebugFlag(
diff --git a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
index 8039fd1..c7cbde8 100644
--- a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
+++ b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java
@@ -36,7 +36,7 @@
public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageIndicator {
private final Paint mSelectedIndicatorPaint;
- private int mSelectedIndicatorHeight;
+ private int mTabVerticalPadding;
private final int mSelectedIndicatorRadius;
private int mIndicatorLeft = -1;
@@ -52,8 +52,8 @@
super(context, attrs);
setWillNotDraw(false);
- mSelectedIndicatorHeight =
- getResources().getDimensionPixelSize(R.dimen.all_apps_header_pill_height);
+ mTabVerticalPadding =
+ getResources().getDimensionPixelSize(R.dimen.all_apps_tabs_vertical_padding);
mSelectedIndicatorRadius = getResources().getDimensionPixelSize(
R.dimen.all_apps_header_pill_corner_radius);
@@ -112,9 +112,9 @@
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
- canvas.drawRoundRect(mIndicatorLeft, getHeight() - mSelectedIndicatorHeight,
- mIndicatorRight, getHeight(), mSelectedIndicatorRadius, mSelectedIndicatorRadius,
- mSelectedIndicatorPaint);
+ canvas.drawRoundRect(mIndicatorLeft, mTabVerticalPadding, mIndicatorRight,
+ getHeight() - mTabVerticalPadding, mSelectedIndicatorRadius,
+ mSelectedIndicatorRadius, mSelectedIndicatorPaint);
}
@Override