mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Moving the class LayoutParams to a file outside CellLayout
I'm moving the LayoutParams to another file to start the decoupling of the Reorder outside of the CellLayout. Also, I change the name from LayoutParams to LauncherLayoutParams to prevent confusion with ViewGroup.LayoutParams making it explicit that this are different LayoutParams. Bug: 188081026 Test: atest ReorderWidget Change-Id: I92251c5540ffcf5ece7b933e6f6c836eb825c997
This commit is contained in:
committed by
Sebastián Franco
parent
b759de4769
commit
d468299c0f
@@ -32,6 +32,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.annotation.Px;
|
||||
|
||||
import com.android.launcher3.accessibility.DragViewStateAnnouncer;
|
||||
import com.android.launcher3.celllayout.CellLayoutLayoutParams;
|
||||
import com.android.launcher3.dragndrop.DragLayer;
|
||||
import com.android.launcher3.keyboard.ViewGroupFocusHelper;
|
||||
import com.android.launcher3.logging.InstanceId;
|
||||
@@ -265,7 +266,7 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
|
||||
}
|
||||
}
|
||||
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) mWidgetView.getLayoutParams();
|
||||
CellLayoutLayoutParams lp = (CellLayoutLayoutParams) mWidgetView.getLayoutParams();
|
||||
ItemInfo widgetInfo = (ItemInfo) mWidgetView.getTag();
|
||||
lp.cellX = lp.tmpCellX = widgetInfo.cellX;
|
||||
lp.cellY = lp.tmpCellY = widgetInfo.cellY;
|
||||
@@ -405,7 +406,7 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
|
||||
*/
|
||||
private void resizeWidgetIfNeeded(boolean onDismiss) {
|
||||
ViewGroup.LayoutParams wlp = mWidgetView.getLayoutParams();
|
||||
if (!(wlp instanceof CellLayout.LayoutParams)) {
|
||||
if (!(wlp instanceof CellLayoutLayoutParams)) {
|
||||
return;
|
||||
}
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
@@ -420,7 +421,7 @@ public class AppWidgetResizeFrame extends AbstractFloatingView implements View.O
|
||||
mDirectionVector[0] = 0;
|
||||
mDirectionVector[1] = 0;
|
||||
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) wlp;
|
||||
CellLayoutLayoutParams lp = (CellLayoutLayoutParams) wlp;
|
||||
|
||||
int spanX = lp.cellHSpan;
|
||||
int spanY = lp.cellVSpan;
|
||||
|
||||
Reference in New Issue
Block a user