Merge "Measure WidgetsFullSheet before estimating the recommended table size" into sc-dev am: 6a01fe49a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15359118 Change-Id: I0004e2f55347e018fa553f8b56c26a754a93e0f1
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package com.android.launcher3.widget.picker;
|
package com.android.launcher3.widget.picker;
|
||||||
|
|
||||||
|
import static android.view.View.MeasureSpec.makeMeasureSpec;
|
||||||
|
|
||||||
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
|
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
|
||||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WIDGETSTRAY_SEARCHED;
|
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WIDGETSTRAY_SEARCHED;
|
||||||
import static com.android.launcher3.testing.TestProtocol.NORMAL_STATE_ORDINAL;
|
import static com.android.launcher3.testing.TestProtocol.NORMAL_STATE_ORDINAL;
|
||||||
@@ -520,7 +522,12 @@ public class WidgetsFullSheet extends BaseWidgetSheet
|
|||||||
mNoWidgetsView.getText().length(), noWidgetsViewTextBounds);
|
mNoWidgetsView.getText().length(), noWidgetsViewTextBounds);
|
||||||
noWidgetsViewHeight = noWidgetsViewTextBounds.height();
|
noWidgetsViewHeight = noWidgetsViewTextBounds.height();
|
||||||
}
|
}
|
||||||
float maxTableHeight = (mActivityContext.getDeviceProfile().availableHeightPx
|
doMeasure(
|
||||||
|
makeMeasureSpec(mActivityContext.getDeviceProfile().availableWidthPx,
|
||||||
|
MeasureSpec.EXACTLY),
|
||||||
|
makeMeasureSpec(mActivityContext.getDeviceProfile().availableHeightPx,
|
||||||
|
MeasureSpec.EXACTLY));
|
||||||
|
float maxTableHeight = (mContent.getMeasuredHeight()
|
||||||
- mTabsHeight - mViewPagerTopPadding - getHeaderViewHeight()
|
- mTabsHeight - mViewPagerTopPadding - getHeaderViewHeight()
|
||||||
- noWidgetsViewHeight) * RECOMMENDATION_TABLE_HEIGHT_RATIO;
|
- noWidgetsViewHeight) * RECOMMENDATION_TABLE_HEIGHT_RATIO;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user