Loading src/com/android/launcher3/widget/WidgetsBottomSheet.java +11 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import android.animation.PropertyValuesHolder; import android.content.Context; import android.content.res.Configuration; import android.graphics.Rect; import android.util.AttributeSet; import android.util.IntProperty; Loading Loading @@ -71,6 +72,7 @@ public class WidgetsBottomSheet extends BaseWidgetSheet implements Insettable { private Rect mInsets; private final int mMaxTableHeight; private int mMaxHorizontalSpan = 4; private Configuration mCurrentConfiguration; public WidgetsBottomSheet(Context context, AttributeSet attrs) { this(context, attrs, 0); Loading @@ -85,6 +87,7 @@ public class WidgetsBottomSheet extends BaseWidgetSheet implements Insettable { // Set the max table height to 2 / 3 of the grid height so that the bottom picker won't // take over the entire view vertically. mMaxTableHeight = deviceProfile.inv.numRows * 2 / 3 * deviceProfile.cellHeightPx; mCurrentConfiguration = new Configuration(getResources().getConfiguration()); } @Override Loading Loading @@ -211,6 +214,14 @@ public class WidgetsBottomSheet extends BaseWidgetSheet implements Insettable { setPadding(leftInset, getPaddingTop(), rightInset, bottomInset); } @Override protected void onConfigurationChanged(Configuration newConfig) { if (mCurrentConfiguration.orientation != newConfig.orientation) { mInsets.setEmpty(); } mCurrentConfiguration.updateFrom(newConfig); } @Override protected Pair<View, String> getAccessibilityTarget() { return Pair.create(findViewById(R.id.title), getContext().getString( Loading Loading
src/com/android/launcher3/widget/WidgetsBottomSheet.java +11 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN; import android.animation.PropertyValuesHolder; import android.content.Context; import android.content.res.Configuration; import android.graphics.Rect; import android.util.AttributeSet; import android.util.IntProperty; Loading Loading @@ -71,6 +72,7 @@ public class WidgetsBottomSheet extends BaseWidgetSheet implements Insettable { private Rect mInsets; private final int mMaxTableHeight; private int mMaxHorizontalSpan = 4; private Configuration mCurrentConfiguration; public WidgetsBottomSheet(Context context, AttributeSet attrs) { this(context, attrs, 0); Loading @@ -85,6 +87,7 @@ public class WidgetsBottomSheet extends BaseWidgetSheet implements Insettable { // Set the max table height to 2 / 3 of the grid height so that the bottom picker won't // take over the entire view vertically. mMaxTableHeight = deviceProfile.inv.numRows * 2 / 3 * deviceProfile.cellHeightPx; mCurrentConfiguration = new Configuration(getResources().getConfiguration()); } @Override Loading Loading @@ -211,6 +214,14 @@ public class WidgetsBottomSheet extends BaseWidgetSheet implements Insettable { setPadding(leftInset, getPaddingTop(), rightInset, bottomInset); } @Override protected void onConfigurationChanged(Configuration newConfig) { if (mCurrentConfiguration.orientation != newConfig.orientation) { mInsets.setEmpty(); } mCurrentConfiguration.updateFrom(newConfig); } @Override protected Pair<View, String> getAccessibilityTarget() { return Pair.create(findViewById(R.id.title), getContext().getString( Loading