mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Use 32dp as the content margin for widgets pickers in large screen
devices Test: manual Bug: 194369046 Change-Id: I7376eab59d57bdd9ccc8a64e9f321358e09ee579
This commit is contained in:
@@ -66,8 +66,12 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher>
|
||||
/* Touch handling related member variables. */
|
||||
private Toast mWidgetInstructionToast;
|
||||
|
||||
private int mContentHorizontalMarginInPx;
|
||||
|
||||
public BaseWidgetSheet(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mContentHorizontalMarginInPx = getResources().getDimensionPixelSize(
|
||||
R.dimen.widget_list_horizontal_margin);
|
||||
}
|
||||
|
||||
protected int getScrimColor(Context context) {
|
||||
@@ -119,8 +123,16 @@ public abstract class BaseWidgetSheet extends AbstractSlideInView<Launcher>
|
||||
@Override
|
||||
public void setInsets(Rect insets) {
|
||||
mInsets.set(insets);
|
||||
int contentHorizontalMarginInPx = getResources().getDimensionPixelSize(
|
||||
R.dimen.widget_list_horizontal_margin);
|
||||
if (contentHorizontalMarginInPx != mContentHorizontalMarginInPx) {
|
||||
onContentHorizontalMarginChanged(contentHorizontalMarginInPx);
|
||||
mContentHorizontalMarginInPx = contentHorizontalMarginInPx;
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when the horizontal margin of the content view has changed. */
|
||||
protected abstract void onContentHorizontalMarginChanged(int contentHorizontalMarginInPx);
|
||||
|
||||
/**
|
||||
* Measures the dimension of this view and its children by taking system insets, navigation bar,
|
||||
|
||||
Reference in New Issue
Block a user