Merge "No scrolling in overflow" into rvc-dev am: e01e3a69ad am: b63d39c5eb am: 946841ce49
Change-Id: I0da891702e3b1902db39e714b4bec0f3b5a1cc00
This commit is contained in:
@@ -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 static com.android.systemui.bubbles.BubbleDebugConfig.TAG_WITH_CLASS_NAME;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
@@ -60,6 +61,16 @@ public class BubbleOverflowActivity extends Activity {
|
|||||||
private RecyclerView mRecyclerView;
|
private RecyclerView mRecyclerView;
|
||||||
private List<Bubble> mOverflowBubbles = new ArrayList<>();
|
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
|
@Inject
|
||||||
public BubbleOverflowActivity(BubbleController controller) {
|
public BubbleOverflowActivity(BubbleController controller) {
|
||||||
mBubbleController = controller;
|
mBubbleController = controller;
|
||||||
@@ -78,7 +89,7 @@ public class BubbleOverflowActivity extends Activity {
|
|||||||
Resources res = getResources();
|
Resources res = getResources();
|
||||||
final int columns = res.getInteger(R.integer.bubbles_overflow_columns);
|
final int columns = res.getInteger(R.integer.bubbles_overflow_columns);
|
||||||
mRecyclerView.setLayoutManager(
|
mRecyclerView.setLayoutManager(
|
||||||
new GridLayoutManager(getApplicationContext(), columns));
|
new NoScrollGridLayoutManager(getApplicationContext(), columns));
|
||||||
|
|
||||||
DisplayMetrics displayMetrics = new DisplayMetrics();
|
DisplayMetrics displayMetrics = new DisplayMetrics();
|
||||||
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
|
||||||
|
|||||||
Reference in New Issue
Block a user