diff options
| author | 2020-04-28 16:35:20 +0000 | |
|---|---|---|
| committer | 2020-04-28 16:35:20 +0000 | |
| commit | e01e3a69ad717921783917864a5686879a41b08d (patch) | |
| tree | a3b1772f2fc92a0f0fab4033a64dc43f2723c707 | |
| parent | 7f042aaada26315fd30f62a77ca26459c4494d83 (diff) | |
| parent | 2cf5d90422d02d9685463ff41032239eaa138a61 (diff) | |
Merge "No scrolling in overflow" into rvc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java index 37841f24a3cf..13bc55c9dcb6 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleOverflowActivity.java @@ -21,6 +21,7 @@ import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_BUBBLES; import static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME; import android.app.Activity; +import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; @@ -60,6 +61,16 @@ public class BubbleOverflowActivity extends Activity { private RecyclerView mRecyclerView; private List<Bubble> mOverflowBubbles = new ArrayList<>(); + private class NoScrollGridLayoutManager extends GridLayoutManager { + NoScrollGridLayoutManager(Context context, int columns) { + super(context, columns); + } + @Override + public boolean canScrollVertically() { + return false; + } + } + @Inject public BubbleOverflowActivity(BubbleController controller) { mBubbleController = controller; @@ -78,7 +89,7 @@ public class BubbleOverflowActivity extends Activity { Resources res = getResources(); final int columns = res.getInteger(R.integer.bubbles_overflow_columns); mRecyclerView.setLayoutManager( - new GridLayoutManager(getApplicationContext(), columns)); + new NoScrollGridLayoutManager(getApplicationContext(), columns)); DisplayMetrics displayMetrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); |