Merge "No scrolling in overflow" into rvc-dev am: e01e3a69ad am: b63d39c5eb am: 946841ce49

Change-Id: I0da891702e3b1902db39e714b4bec0f3b5a1cc00
This commit is contained in:
TreeHugger Robot
2020-04-28 16:57:50 +00:00
committed by Automerger Merge Worker

View File

@@ -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);