Lines Matching refs:icon

287      * Notification extras key: this is the resource ID of the notification's main small icon, as
290 public static final String EXTRA_SMALL_ICON = "android.icon";
293 * Notification extras key: this is a bitmap to be used instead of the small icon when showing the
576 * If this notification is being shown as a badge, use the icon provided to
582 * If this notification is being shown as a badge, use the icon provided to
782 * Set the small icon to use in the notification layouts. Different classes of devices
786 * @param icon A resource ID in the application's package of the drawable to use.
788 public Builder setSmallIcon(int icon) {
789 mNotification.icon = icon;
795 * level parameter for when the icon is a {@link android.graphics.drawable.LevelListDrawable
798 * @param icon A resource ID in the application's package of the drawable to use.
799 * @param level The level to use for the icon.
803 public Builder setSmallIcon(int icon, int level) {
804 mNotification.icon = icon;
967 * Set the large icon that is shown in the ticker and notification.
969 public Builder setLargeIcon(Bitmap icon) {
970 mLargeIcon = reduceLargeIconSize(icon);
975 * Reduce the size of a notification icon if it's overly large. The framework does
978 private Bitmap reduceLargeIconSize(Bitmap icon) {
979 if (icon == null || Build.VERSION.SDK_INT >= 27) {
980 return icon;
988 if (icon.getWidth() <= maxWidth && icon.getHeight() <= maxHeight) {
989 return icon;
993 maxWidth / (double) Math.max(1, icon.getWidth()),
994 maxHeight / (double) Math.max(1, icon.getHeight()));
996 icon,
997 (int) Math.ceil(icon.getWidth() * scale),
998 (int) Math.ceil(icon.getHeight() * scale),
1343 * @param icon Resource ID of a drawable that represents the action.
1347 public Builder addAction(int icon, CharSequence title, PendingIntent intent) {
1348 mActions.add(new Action(icon, title, intent));
1377 * @param icon Resource ID of a drawable that represents the action.
1382 public Builder addInvisibleAction(int icon, CharSequence title, PendingIntent intent) {
1383 return addInvisibleAction(new Action(icon, title, intent));
1528 * Sets which icon to display as a badge for this notification.
1536 public Builder setBadgeIconType(@BadgeIconType int icon) {
1537 mBadgeIcon = icon;
1746 contentView.setInt(R.id.icon,
1751 contentView.setInt(R.id.icon,
1757 // On versions before Jellybean, the large icon was shown by SystemUI, so we need
1760 contentView.setViewVisibility(R.id.icon, View.VISIBLE);
1761 contentView.setImageViewBitmap(R.id.icon, mBuilder.mLargeIcon);
1763 contentView.setViewVisibility(R.id.icon, View.GONE);
1765 if (showSmallIcon && mBuilder.mNotification.icon != 0) {
1772 mBuilder.mNotification.icon,
1779 mBuilder.mNotification.icon, Color.WHITE));
1783 } else if (showSmallIcon && mBuilder.mNotification.icon != 0) { // small icon at left
1784 contentView.setViewVisibility(R.id.icon, View.VISIBLE);
1792 mBuilder.mNotification.icon,
1796 contentView.setImageViewBitmap(R.id.icon, smallBit);
1798 contentView.setImageViewBitmap(R.id.icon, createColoredBitmap(
1799 mBuilder.mNotification.icon, Color.WHITE));
1809 // If there is a large icon we have a right side
1905 Drawable icon = mBuilder.mContext.getResources().getDrawable(iconId).mutate();
1906 icon.setFilterBitmap(true);
1908 icon.setBounds(inset, inset, iconSize + inset, iconSize + inset);
1909 icon.setColorFilter(new PorterDuffColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP));
1910 icon.draw(canvas);
2016 * Override the large icon when the big notification is shown.
3007 * It must include an icon, a label, and a {@link PendingIntent} to be fired when the action is
3101 * Small icon representing the action.
3103 public int icon;
3114 public Action(int icon, CharSequence title, PendingIntent intent) {
3115 this(icon, title, intent, new Bundle(), null, null, true, SEMANTIC_ACTION_NONE, true);
3118 Action(int icon, CharSequence title, PendingIntent intent, Bundle extras,
3122 this.icon = icon;
3134 return icon;
3217 * @param icon icon to show for this action
3221 public Builder(int icon, CharSequence title, PendingIntent intent) {
3222 this(icon, title, intent, new Bundle(), null, true, SEMANTIC_ACTION_NONE, true);
3231 this(action.icon, action.title, action.actionIntent, new Bundle(action.mExtras),
3236 private Builder(int icon, CharSequence title, PendingIntent intent, Bundle extras,
3239 mIcon = icon;
4163 * Set an icon that goes with the content of this notification.
4166 public WearableExtender setContentIcon(int icon) {
4167 mContentIcon = icon;
4172 * Get an icon that goes with the content of this notification.
4180 * Set the gravity that the content icon should have within the notification display.
4192 * Get the gravity that the content icon should have within the notification display.
4356 * Set a hint that this notification's icon should not be displayed.
4357 * @param hintHideIcon {@code true} to hide the icon, {@code false} otherwise.
4367 * Get a hint that this notification's icon should not be displayed.
4368 * @return {@code true} if this icon should not be displayed, false otherwise.
4762 * Sets the large icon of the car notification.
4764 * If no large icon is set in the extender, Android Auto will display the icon
4767 * @param largeIcon The large icon to use in the car notification.
4776 * Gets the large icon used in this car notification, or null if no icon has been set.
4778 * @return The large icon for the car notification.
5038 return NotificationCompatJellybean.readAction(action.icon, action.title,
5083 return new Action(action.icon, action.title, action.actionIntent,
5231 * Returns what icon should be shown for this notification if it is being displayed in a