Merge "Calculate taskbar content size for edu" into tm-qpr-dev am: b1d991b3de
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/20222586 Change-Id: Id532b20d77758d473331b032a4e149ec9e7cdb5c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
ced3dbf5a3
3 files changed
+18
-6
No files matched your search
@@ -219,7 +219,7 @@ public class TaskbarEduController implements TaskbarControllers.LoggableTaskbarC
|
|||||||
}
|
}
|
||||||
|
|
||||||
int getIconLayoutBoundsWidth() {
|
int getIconLayoutBoundsWidth() {
|
||||||
return mControllers.taskbarViewController.getIconLayoutBounds().width();
|
return mControllers.taskbarViewController.getIconLayoutWidth();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,12 +293,8 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
|||||||
@Override
|
@Override
|
||||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||||
int count = getChildCount();
|
int count = getChildCount();
|
||||||
int countExcludingQsb = count;
|
|
||||||
DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
|
DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
|
||||||
if (deviceProfile.isQsbInline) {
|
int spaceNeeded = getIconLayoutWidth();
|
||||||
countExcludingQsb--;
|
|
||||||
}
|
|
||||||
int spaceNeeded = countExcludingQsb * (mItemMarginLeftRight * 2 + mIconTouchSize);
|
|
||||||
int navSpaceNeeded = deviceProfile.hotseatBarEndOffset;
|
int navSpaceNeeded = deviceProfile.hotseatBarEndOffset;
|
||||||
boolean layoutRtl = isLayoutRtl();
|
boolean layoutRtl = isLayoutRtl();
|
||||||
int iconEnd = right - (right - left - spaceNeeded) / 2;
|
int iconEnd = right - (right - left - spaceNeeded) / 2;
|
||||||
@@ -388,6 +384,18 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
|||||||
return mIconLayoutBounds;
|
return mIconLayoutBounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the space used by the icons
|
||||||
|
*/
|
||||||
|
public int getIconLayoutWidth() {
|
||||||
|
int countExcludingQsb = getChildCount();
|
||||||
|
DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
|
||||||
|
if (deviceProfile.isQsbInline) {
|
||||||
|
countExcludingQsb--;
|
||||||
|
}
|
||||||
|
return countExcludingQsb * (mItemMarginLeftRight * 2 + mIconTouchSize);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the app icons currently shown in the taskbar.
|
* Returns the app icons currently shown in the taskbar.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -199,6 +199,10 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
|||||||
return mTaskbarView.getIconLayoutBounds();
|
return mTaskbarView.getIconLayoutBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getIconLayoutWidth() {
|
||||||
|
return mTaskbarView.getIconLayoutWidth();
|
||||||
|
}
|
||||||
|
|
||||||
public View[] getIconViews() {
|
public View[] getIconViews() {
|
||||||
return mTaskbarView.getIconViews();
|
return mTaskbarView.getIconViews();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user