Merge "Taskbar All Apps button visual updates" into tm-qpr-dev am: a0743cf62c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20724415 Change-Id: Ib3ff9ebcfd645a6f929e17e17aec4f14b070b7ec Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -63,6 +63,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
private final int mIconTouchSize;
|
||||
private final int mItemMarginLeftRight;
|
||||
private final int mItemPadding;
|
||||
private final boolean mIsRtl;
|
||||
|
||||
private final TaskbarActivityContext mActivityContext;
|
||||
|
||||
@@ -100,6 +101,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
mActivityContext = ActivityContext.lookupContext(context);
|
||||
mIconLayoutBounds = mActivityContext.getTransientTaskbarBounds();
|
||||
mIsRtl = Utilities.isRtl(getResources());
|
||||
|
||||
Resources resources = getResources();
|
||||
mIconTouchSize = resources.getDimensionPixelSize(R.dimen.taskbar_icon_touch_size);
|
||||
@@ -122,6 +124,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
mAllAppsButton = LayoutInflater.from(context)
|
||||
.inflate(R.layout.taskbar_all_apps_button, this, false);
|
||||
mAllAppsButton.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
|
||||
mAllAppsButton.setScaleX(mIsRtl ? -1 : 1);
|
||||
if (mActivityContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_PC)) {
|
||||
mAllAppsButton.setVisibility(GONE);
|
||||
}
|
||||
@@ -254,11 +257,11 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
}
|
||||
|
||||
if (mAllAppsButton != null) {
|
||||
int index = Utilities.isRtl(getResources()) ? 0 : getChildCount();
|
||||
int index = mIsRtl ? getChildCount() : 0;
|
||||
addView(mAllAppsButton, index);
|
||||
}
|
||||
if (mActivityContext.getDeviceProfile().isQsbInline) {
|
||||
addView(mQsb, Utilities.isRtl(getResources()) ? getChildCount() : 0);
|
||||
addView(mQsb, mIsRtl ? getChildCount() : 0);
|
||||
// Always set QSB to invisible after re-adding.
|
||||
mQsb.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
@@ -401,8 +401,8 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
// Note that there is no All Apps button in the hotseat, this position is only used
|
||||
// as its convenient for animation purposes.
|
||||
positionInHotseat = Utilities.isRtl(child.getResources())
|
||||
? -1
|
||||
: taskbarDp.numShownHotseatIcons;
|
||||
? taskbarDp.numShownHotseatIcons
|
||||
: -1;
|
||||
} else if (child.getTag() instanceof ItemInfo) {
|
||||
positionInHotseat = ((ItemInfo) child.getTag()).screenId;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user