Limit the number of concurrent notifs appear on screen am: abe9246caa
am: 273df63430
am: 86887fcb9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15531757 Change-Id: I6cf45299e7387c68637145195ddbbd2500e2c1cf
This commit is contained in:
@@ -81,9 +81,10 @@
|
|||||||
<com.android.settings.notification.history.NotificationHistoryRecyclerView
|
<com.android.settings.notification.history.NotificationHistoryRecyclerView
|
||||||
android:id="@+id/notification_list"
|
android:id="@+id/notification_list"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="500dp"
|
||||||
android:clipChildren="true"
|
android:clipChildren="true"
|
||||||
android:clipToPadding="true"
|
android:clipToPadding="true"
|
||||||
|
android:clipToOutline="true"
|
||||||
android:importantForAccessibility="yes"
|
android:importantForAccessibility="yes"
|
||||||
android:scrollbars="none"/>
|
android:scrollbars="none"/>
|
||||||
|
|
||||||
|
@@ -71,6 +71,11 @@ public class NotificationHistoryAdapter extends
|
|||||||
return new NotificationHistoryViewHolder(view);
|
return new NotificationHistoryViewHolder(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return mValues.get(position).hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(final @NonNull NotificationHistoryViewHolder holder,
|
public void onBindViewHolder(final @NonNull NotificationHistoryViewHolder holder,
|
||||||
int position) {
|
int position) {
|
||||||
|
@@ -40,7 +40,6 @@ public class NotificationHistoryRecyclerView extends RecyclerView {
|
|||||||
ItemTouchHelper touchHelper = new ItemTouchHelper(
|
ItemTouchHelper touchHelper = new ItemTouchHelper(
|
||||||
new DismissTouchHelper(0, ItemTouchHelper.START | ItemTouchHelper.END));
|
new DismissTouchHelper(0, ItemTouchHelper.START | ItemTouchHelper.END));
|
||||||
touchHelper.attachToRecyclerView(this);
|
touchHelper.attachToRecyclerView(this);
|
||||||
setNestedScrollingEnabled(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOnItemSwipeDeleteListener(OnItemSwipeDeleteListener listener) {
|
public void setOnItemSwipeDeleteListener(OnItemSwipeDeleteListener listener) {
|
||||||
|
Reference in New Issue
Block a user