Loading core/java/android/app/Notification.java +30 −30 Original line number Diff line number Diff line Loading @@ -2488,15 +2488,15 @@ public class Notification implements Parcelable /** * Helper class for generating large-format notifications that include a large image attachment. * * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so: * Here's how you'd set the <code>BigPictureStyle</code> on a notification: * <pre class="prettyprint"> * Notification noti = new Notification.BigPictureStyle( * new Notification.Builder() * Notification notif = new Notification.Builder(mContext) * .setContentTitle("New photo from " + sender.toString()) * .setContentText(subject) * .setSmallIcon(R.drawable.new_post) * .setLargeIcon(aBitmap)) * .bigPicture(aBigBitmap) * .setLargeIcon(aBitmap) * .setStyle(new Notification.BigPictureStyle() * .bigPicture(aBigBitmap)) * .build(); * </pre> * Loading Loading @@ -2584,15 +2584,15 @@ public class Notification implements Parcelable /** * Helper class for generating large-format notifications that include a lot of text. * * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so: * Here's how you'd set the <code>BigTextStyle</code> on a notification: * <pre class="prettyprint"> * Notification noti = new Notification.BigTextStyle( * new Notification.Builder() * Notification notif = new Notification.Builder(mContext) * .setContentTitle("New mail from " + sender.toString()) * .setContentText(subject) * .setSmallIcon(R.drawable.new_mail) * .setLargeIcon(aBitmap)) * .bigText(aVeryLongString) * .setLargeIcon(aBitmap) * .setStyle(new Notification.BigTextStyle() * .bigText(aVeryLongString)) * .build(); * </pre> * Loading Loading @@ -2678,18 +2678,18 @@ public class Notification implements Parcelable /** * Helper class for generating large-format notifications that include a list of (up to 5) strings. * * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so: * Here's how you'd set the <code>InboxStyle</code> on a notification: * <pre class="prettyprint"> * Notification noti = new Notification.InboxStyle( * new Notification.Builder() * Notification notif = new Notification.Builder(mContext) * .setContentTitle("5 New mails from " + sender.toString()) * .setContentText(subject) * .setSmallIcon(R.drawable.new_mail) * .setLargeIcon(aBitmap)) * .setLargeIcon(aBitmap) * .setStyle(new Notification.InboxStyle() * .addLine(str1) * .addLine(str2) * .setContentTitle("") * .setSummaryText("+3 more") * .setContentTitle("") * .setSummaryText("+3 more")) * .build(); * </pre> * Loading Loading
core/java/android/app/Notification.java +30 −30 Original line number Diff line number Diff line Loading @@ -2488,15 +2488,15 @@ public class Notification implements Parcelable /** * Helper class for generating large-format notifications that include a large image attachment. * * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so: * Here's how you'd set the <code>BigPictureStyle</code> on a notification: * <pre class="prettyprint"> * Notification noti = new Notification.BigPictureStyle( * new Notification.Builder() * Notification notif = new Notification.Builder(mContext) * .setContentTitle("New photo from " + sender.toString()) * .setContentText(subject) * .setSmallIcon(R.drawable.new_post) * .setLargeIcon(aBitmap)) * .bigPicture(aBigBitmap) * .setLargeIcon(aBitmap) * .setStyle(new Notification.BigPictureStyle() * .bigPicture(aBigBitmap)) * .build(); * </pre> * Loading Loading @@ -2584,15 +2584,15 @@ public class Notification implements Parcelable /** * Helper class for generating large-format notifications that include a lot of text. * * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so: * Here's how you'd set the <code>BigTextStyle</code> on a notification: * <pre class="prettyprint"> * Notification noti = new Notification.BigTextStyle( * new Notification.Builder() * Notification notif = new Notification.Builder(mContext) * .setContentTitle("New mail from " + sender.toString()) * .setContentText(subject) * .setSmallIcon(R.drawable.new_mail) * .setLargeIcon(aBitmap)) * .bigText(aVeryLongString) * .setLargeIcon(aBitmap) * .setStyle(new Notification.BigTextStyle() * .bigText(aVeryLongString)) * .build(); * </pre> * Loading Loading @@ -2678,18 +2678,18 @@ public class Notification implements Parcelable /** * Helper class for generating large-format notifications that include a list of (up to 5) strings. * * This class is a "rebuilder": It consumes a Builder object and modifies its behavior, like so: * Here's how you'd set the <code>InboxStyle</code> on a notification: * <pre class="prettyprint"> * Notification noti = new Notification.InboxStyle( * new Notification.Builder() * Notification notif = new Notification.Builder(mContext) * .setContentTitle("5 New mails from " + sender.toString()) * .setContentText(subject) * .setSmallIcon(R.drawable.new_mail) * .setLargeIcon(aBitmap)) * .setLargeIcon(aBitmap) * .setStyle(new Notification.InboxStyle() * .addLine(str1) * .addLine(str2) * .setContentTitle("") * .setSummaryText("+3 more") * .setContentTitle("") * .setSummaryText("+3 more")) * .build(); * </pre> * Loading