mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Exposing some private methods to easily customize widgets popup
Change-Id: Ie7bd879200b1f14d472ff03fd64429930651a39f
This commit is contained in:
@@ -71,7 +71,7 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean onLongClick(View v) {
|
||||
public boolean onLongClick(View v) {
|
||||
if (!ItemLongClickListener.canStartDrag(mLauncher)) return false;
|
||||
|
||||
if (v instanceof WidgetCell) {
|
||||
@@ -96,7 +96,7 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
|
||||
}
|
||||
|
||||
int[] loc = new int[2];
|
||||
mLauncher.getDragLayer().getLocationInDragLayer(image, loc);
|
||||
getPopupContainer().getLocationInDragLayer(image, loc);
|
||||
|
||||
new PendingItemDragHelper(v).startDrag(
|
||||
image.getBitmapBounds(), image.getBitmap().getWidth(), image.getWidth(),
|
||||
@@ -119,13 +119,13 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
|
||||
}
|
||||
|
||||
protected void clearNavBarColor() {
|
||||
mLauncher.getSystemUiController().updateUiState(
|
||||
getSystemUiController().updateUiState(
|
||||
SystemUiController.UI_STATE_WIDGET_BOTTOM_SHEET, 0);
|
||||
}
|
||||
|
||||
protected void setupNavBarColor() {
|
||||
boolean isSheetDark = Themes.getAttrBoolean(mLauncher, R.attr.isMainColorDark);
|
||||
mLauncher.getSystemUiController().updateUiState(
|
||||
boolean isSheetDark = Themes.getAttrBoolean(getContext(), R.attr.isMainColorDark);
|
||||
getSystemUiController().updateUiState(
|
||||
SystemUiController.UI_STATE_WIDGET_BOTTOM_SHEET,
|
||||
isSheetDark ? SystemUiController.FLAG_DARK_NAV : SystemUiController.FLAG_LIGHT_NAV);
|
||||
}
|
||||
@@ -145,4 +145,7 @@ abstract class BaseWidgetSheet extends AbstractSlideInView
|
||||
|
||||
protected abstract int getElementsRowCount();
|
||||
|
||||
protected SystemUiController getSystemUiController() {
|
||||
return mLauncher.getSystemUiController();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user