Support more items in the Notification.InboxStyle, plus an overflow.
Bug: 6500113 Change-Id: I9f6b45ef0821c45000afa8a23ee51033b51df298
This commit is contained in:
committed by
Android (Google) Code Review
parent
d7ba814370
commit
29bb6d925b
@@ -1850,7 +1850,7 @@ public class Notification implements Parcelable
|
||||
contentView.setViewVisibility(R.id.text2, View.GONE);
|
||||
|
||||
int[] rowIds = {R.id.inbox_text0, R.id.inbox_text1, R.id.inbox_text2, R.id.inbox_text3,
|
||||
R.id.inbox_text4};
|
||||
R.id.inbox_text4, R.id.inbox_text5, R.id.inbox_text6};
|
||||
|
||||
// Make sure all rows are gone in case we reuse a view.
|
||||
for (int rowId : rowIds) {
|
||||
@@ -1867,6 +1867,12 @@ public class Notification implements Parcelable
|
||||
i++;
|
||||
}
|
||||
|
||||
if (mTexts.size() > rowIds.length) {
|
||||
contentView.setViewVisibility(R.id.inbox_more, View.VISIBLE);
|
||||
} else {
|
||||
contentView.setViewVisibility(R.id.inbox_more, View.GONE);
|
||||
}
|
||||
|
||||
return contentView;
|
||||
}
|
||||
|
||||
|
||||
@@ -132,6 +132,34 @@
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<TextView android:id="@+id/inbox_text5"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<TextView android:id="@+id/inbox_text6"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<TextView android:id="@+id/inbox_more"
|
||||
android:textAppearance="@style/TextAppearance.StatusBar.EventContent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="1"
|
||||
android:text="@android:string/ellipsis"
|
||||
/>
|
||||
<include
|
||||
layout="@layout/notification_action_list"
|
||||
android:id="@+id/actions"
|
||||
|
||||
@@ -208,6 +208,9 @@
|
||||
<java-symbol type="id" name="inbox_text2" />
|
||||
<java-symbol type="id" name="inbox_text3" />
|
||||
<java-symbol type="id" name="inbox_text4" />
|
||||
<java-symbol type="id" name="inbox_text5" />
|
||||
<java-symbol type="id" name="inbox_text6" />
|
||||
<java-symbol type="id" name="inbox_more" />
|
||||
<java-symbol type="id" name="status_bar_latest_event_content" />
|
||||
|
||||
<java-symbol type="attr" name="actionModeShareDrawable" />
|
||||
|
||||
Reference in New Issue
Block a user