mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 18:06:48 +00:00
Exact widget sizes functionalities into an utility class
Test: resize widget, move widget, add widget. Bug: 189975670 Change-Id: Ia0bc2297891e1cfa33697e985064db5d1dcdfc8b
This commit is contained in:
@@ -26,13 +26,13 @@ import android.os.Process;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.AppWidgetResizeFrame;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.logger.LauncherAtom;
|
||||
import com.android.launcher3.util.ContentWriter;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetHostView;
|
||||
import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
|
||||
import com.android.launcher3.widget.util.WidgetSizes;
|
||||
|
||||
/**
|
||||
* Represents a widget (either instantiated or about to be) in the Launcher.
|
||||
@@ -196,7 +196,7 @@ public class LauncherAppWidgetInfo extends ItemInfo {
|
||||
*/
|
||||
public void onBindAppWidget(Launcher launcher, AppWidgetHostView hostView) {
|
||||
if (!mHasNotifiedInitialWidgetSizeChanged) {
|
||||
AppWidgetResizeFrame.updateWidgetSizeRanges(hostView, launcher, spanX, spanY);
|
||||
WidgetSizes.updateWidgetSizeRanges(hostView, launcher, spanX, spanY);
|
||||
mHasNotifiedInitialWidgetSizeChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user