Loading core/java/android/app/Notification.java +20 −4 Original line number Original line Diff line number Diff line Loading @@ -1614,6 +1614,7 @@ public class Notification implements Parcelable { { private CharSequence mBigContentTitle; private CharSequence mBigContentTitle; private CharSequence mSummaryText = null; private CharSequence mSummaryText = null; private boolean mSummaryTextSet = false; protected Builder mBuilder; protected Builder mBuilder; Loading @@ -1630,6 +1631,7 @@ public class Notification implements Parcelable */ */ protected void internalSetSummaryText(CharSequence cs) { protected void internalSetSummaryText(CharSequence cs) { mSummaryText = cs; mSummaryText = cs; mSummaryTextSet = true; } } public void setBuilder(Builder builder) { public void setBuilder(Builder builder) { Loading Loading @@ -1660,9 +1662,13 @@ public class Notification implements Parcelable contentView.setViewVisibility(R.id.line1, View.VISIBLE); contentView.setViewVisibility(R.id.line1, View.VISIBLE); } } // The last line defaults to the content text or subtext, but can be replaced by mSummaryText // The last line defaults to the subtext, but can be replaced by mSummaryText if (mSummaryText != null && !mSummaryText.equals("")) { final CharSequence overflowText = contentView.setTextViewText(R.id.text, mSummaryText); mSummaryTextSet ? mSummaryText : mBuilder.mSubText; if (overflowText != null) { contentView.setTextViewText(R.id.text, overflowText); contentView.setViewVisibility(R.id.overflow_divider, View.VISIBLE); contentView.setViewVisibility(R.id.line3, View.VISIBLE); contentView.setViewVisibility(R.id.line3, View.VISIBLE); } } Loading Loading @@ -1803,9 +1809,16 @@ public class Notification implements Parcelable } } private RemoteViews makeBigContentView() { private RemoteViews makeBigContentView() { // Remove the content text so line3 disappears entirely // Remove the content text so line3 only shows if you have a summary final boolean hadThreeLines = (mBuilder.mContentText != null && mBuilder.mSubText != null); mBuilder.mContentText = null; mBuilder.mContentText = null; RemoteViews contentView = getStandardView(R.layout.notification_template_big_text); RemoteViews contentView = getStandardView(R.layout.notification_template_big_text); if (hadThreeLines) { // vertical centering contentView.setViewPadding(R.id.line1, 0, 0, 0, 0); } contentView.setTextViewText(R.id.big_text, mBigText); contentView.setTextViewText(R.id.big_text, mBigText); contentView.setViewVisibility(R.id.big_text, View.VISIBLE); contentView.setViewVisibility(R.id.big_text, View.VISIBLE); contentView.setViewVisibility(R.id.text2, View.GONE); contentView.setViewVisibility(R.id.text2, View.GONE); Loading Loading @@ -1875,7 +1888,10 @@ public class Notification implements Parcelable } } private RemoteViews makeBigContentView() { private RemoteViews makeBigContentView() { // Remove the content text so line3 disappears unless you have a summary mBuilder.mContentText = null; RemoteViews contentView = getStandardView(R.layout.notification_template_inbox); RemoteViews contentView = getStandardView(R.layout.notification_template_inbox); contentView.setViewVisibility(R.id.text2, View.GONE); 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, int[] rowIds = {R.id.inbox_text0, R.id.inbox_text1, R.id.inbox_text2, R.id.inbox_text3, Loading core/res/res/layout/notification_template_big_picture.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -46,7 +46,7 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="208dp" android:layout_marginTop="208dp" android:layout_marginLeft="64dp" android:paddingLeft="64dp" android:layout_gravity="bottom" android:layout_gravity="bottom" android:background="#CC111111" android:background="#CC111111" > > Loading core/res/res/layout/notification_template_big_text.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -110,6 +110,7 @@ android:layout_height="0dp" android:layout_height="0dp" android:layout_marginBottom="8dp" android:layout_marginBottom="8dp" android:layout_marginRight="8dp" android:layout_marginRight="8dp" android:layout_marginTop="2dp" android:singleLine="false" android:singleLine="false" android:visibility="gone" android:visibility="gone" android:maxLines="8" android:maxLines="8" Loading core/res/res/layout/notification_template_inbox.xml +6 −6 Original line number Original line Diff line number Diff line Loading @@ -191,9 +191,8 @@ <ImageView <ImageView android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="1px" android:layout_height="1px" android:id="@+id/overflow_divider" android:id="@+id/action_divider" android:layout_marginTop="8dp" android:visibility="gone" android:visibility="visible" android:background="?android:attr/dividerHorizontal" /> android:background="?android:attr/dividerHorizontal" /> <include <include layout="@layout/notification_action_list" layout="@layout/notification_action_list" Loading @@ -204,9 +203,10 @@ <ImageView <ImageView android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="1px" android:layout_height="1px" android:id="@+id/action_divider" android:id="@+id/overflow_divider" android:visibility="gone" android:layout_marginTop="8dp" android:background="?android:attr/dividerHorizontal" /><!-- note: divider below actions --> android:visibility="visible" android:background="?android:attr/dividerHorizontal" /> <LinearLayout <LinearLayout android:id="@+id/line3" android:id="@+id/line3" android:layout_width="match_parent" android:layout_width="match_parent" Loading Loading
core/java/android/app/Notification.java +20 −4 Original line number Original line Diff line number Diff line Loading @@ -1614,6 +1614,7 @@ public class Notification implements Parcelable { { private CharSequence mBigContentTitle; private CharSequence mBigContentTitle; private CharSequence mSummaryText = null; private CharSequence mSummaryText = null; private boolean mSummaryTextSet = false; protected Builder mBuilder; protected Builder mBuilder; Loading @@ -1630,6 +1631,7 @@ public class Notification implements Parcelable */ */ protected void internalSetSummaryText(CharSequence cs) { protected void internalSetSummaryText(CharSequence cs) { mSummaryText = cs; mSummaryText = cs; mSummaryTextSet = true; } } public void setBuilder(Builder builder) { public void setBuilder(Builder builder) { Loading Loading @@ -1660,9 +1662,13 @@ public class Notification implements Parcelable contentView.setViewVisibility(R.id.line1, View.VISIBLE); contentView.setViewVisibility(R.id.line1, View.VISIBLE); } } // The last line defaults to the content text or subtext, but can be replaced by mSummaryText // The last line defaults to the subtext, but can be replaced by mSummaryText if (mSummaryText != null && !mSummaryText.equals("")) { final CharSequence overflowText = contentView.setTextViewText(R.id.text, mSummaryText); mSummaryTextSet ? mSummaryText : mBuilder.mSubText; if (overflowText != null) { contentView.setTextViewText(R.id.text, overflowText); contentView.setViewVisibility(R.id.overflow_divider, View.VISIBLE); contentView.setViewVisibility(R.id.line3, View.VISIBLE); contentView.setViewVisibility(R.id.line3, View.VISIBLE); } } Loading Loading @@ -1803,9 +1809,16 @@ public class Notification implements Parcelable } } private RemoteViews makeBigContentView() { private RemoteViews makeBigContentView() { // Remove the content text so line3 disappears entirely // Remove the content text so line3 only shows if you have a summary final boolean hadThreeLines = (mBuilder.mContentText != null && mBuilder.mSubText != null); mBuilder.mContentText = null; mBuilder.mContentText = null; RemoteViews contentView = getStandardView(R.layout.notification_template_big_text); RemoteViews contentView = getStandardView(R.layout.notification_template_big_text); if (hadThreeLines) { // vertical centering contentView.setViewPadding(R.id.line1, 0, 0, 0, 0); } contentView.setTextViewText(R.id.big_text, mBigText); contentView.setTextViewText(R.id.big_text, mBigText); contentView.setViewVisibility(R.id.big_text, View.VISIBLE); contentView.setViewVisibility(R.id.big_text, View.VISIBLE); contentView.setViewVisibility(R.id.text2, View.GONE); contentView.setViewVisibility(R.id.text2, View.GONE); Loading Loading @@ -1875,7 +1888,10 @@ public class Notification implements Parcelable } } private RemoteViews makeBigContentView() { private RemoteViews makeBigContentView() { // Remove the content text so line3 disappears unless you have a summary mBuilder.mContentText = null; RemoteViews contentView = getStandardView(R.layout.notification_template_inbox); RemoteViews contentView = getStandardView(R.layout.notification_template_inbox); contentView.setViewVisibility(R.id.text2, View.GONE); 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, int[] rowIds = {R.id.inbox_text0, R.id.inbox_text1, R.id.inbox_text2, R.id.inbox_text3, Loading
core/res/res/layout/notification_template_big_picture.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -46,7 +46,7 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="208dp" android:layout_marginTop="208dp" android:layout_marginLeft="64dp" android:paddingLeft="64dp" android:layout_gravity="bottom" android:layout_gravity="bottom" android:background="#CC111111" android:background="#CC111111" > > Loading
core/res/res/layout/notification_template_big_text.xml +1 −0 Original line number Original line Diff line number Diff line Loading @@ -110,6 +110,7 @@ android:layout_height="0dp" android:layout_height="0dp" android:layout_marginBottom="8dp" android:layout_marginBottom="8dp" android:layout_marginRight="8dp" android:layout_marginRight="8dp" android:layout_marginTop="2dp" android:singleLine="false" android:singleLine="false" android:visibility="gone" android:visibility="gone" android:maxLines="8" android:maxLines="8" Loading
core/res/res/layout/notification_template_inbox.xml +6 −6 Original line number Original line Diff line number Diff line Loading @@ -191,9 +191,8 @@ <ImageView <ImageView android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="1px" android:layout_height="1px" android:id="@+id/overflow_divider" android:id="@+id/action_divider" android:layout_marginTop="8dp" android:visibility="gone" android:visibility="visible" android:background="?android:attr/dividerHorizontal" /> android:background="?android:attr/dividerHorizontal" /> <include <include layout="@layout/notification_action_list" layout="@layout/notification_action_list" Loading @@ -204,9 +203,10 @@ <ImageView <ImageView android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="1px" android:layout_height="1px" android:id="@+id/action_divider" android:id="@+id/overflow_divider" android:visibility="gone" android:layout_marginTop="8dp" android:background="?android:attr/dividerHorizontal" /><!-- note: divider below actions --> android:visibility="visible" android:background="?android:attr/dividerHorizontal" /> <LinearLayout <LinearLayout android:id="@+id/line3" android:id="@+id/line3" android:layout_width="match_parent" android:layout_width="match_parent" Loading