Merge "Bugfix where the widget handles appear even when you can't resize it." into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d4df41b78f
@@ -241,13 +241,15 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
|
|||||||
// Only show resize handles for the directions in which resizing is possible.
|
// Only show resize handles for the directions in which resizing is possible.
|
||||||
InvariantDeviceProfile idp = LauncherAppState.getIDP(cellLayout.getContext());
|
InvariantDeviceProfile idp = LauncherAppState.getIDP(cellLayout.getContext());
|
||||||
mVerticalResizeActive = (info.resizeMode & AppWidgetProviderInfo.RESIZE_VERTICAL) != 0
|
mVerticalResizeActive = (info.resizeMode & AppWidgetProviderInfo.RESIZE_VERTICAL) != 0
|
||||||
&& mMinVSpan < idp.numRows && mMaxVSpan > 1;
|
&& mMinVSpan < idp.numRows && mMaxVSpan > 1
|
||||||
|
&& mMinVSpan < mMaxVSpan;
|
||||||
if (!mVerticalResizeActive) {
|
if (!mVerticalResizeActive) {
|
||||||
mDragHandles[INDEX_TOP].setVisibility(GONE);
|
mDragHandles[INDEX_TOP].setVisibility(GONE);
|
||||||
mDragHandles[INDEX_BOTTOM].setVisibility(GONE);
|
mDragHandles[INDEX_BOTTOM].setVisibility(GONE);
|
||||||
}
|
}
|
||||||
mHorizontalResizeActive = (info.resizeMode & AppWidgetProviderInfo.RESIZE_HORIZONTAL) != 0
|
mHorizontalResizeActive = (info.resizeMode & AppWidgetProviderInfo.RESIZE_HORIZONTAL) != 0
|
||||||
&& mMinHSpan < idp.numColumns && mMaxHSpan > 1;
|
&& mMinHSpan < idp.numColumns && mMaxHSpan > 1
|
||||||
|
&& mMinHSpan < mMaxHSpan;
|
||||||
if (!mHorizontalResizeActive) {
|
if (!mHorizontalResizeActive) {
|
||||||
mDragHandles[INDEX_LEFT].setVisibility(GONE);
|
mDragHandles[INDEX_LEFT].setVisibility(GONE);
|
||||||
mDragHandles[INDEX_RIGHT].setVisibility(GONE);
|
mDragHandles[INDEX_RIGHT].setVisibility(GONE);
|
||||||
|
|||||||
Reference in New Issue
Block a user