public Source(String key, int sortOrder, String name, @DrawableRes int iconResId, boolean active) { this.key = key; this.sortOrder = sortOrder; this.name = name; this.iconRes = iconResId; this.active = active; }
public BadgeStyle withGradientDrawable(@DrawableRes int gradientDrawable) { this.mGradientDrawable = gradientDrawable; this.mBadgeBackground = null; return this; }
/** * Set the background drawable for the Slider from a Resource. * This is the view containing the list. * * @param sliderBackgroundDrawableRes * @return */ public DrawerBuilder withSliderBackgroundDrawableRes(@DrawableRes int sliderBackgroundDrawableRes) { this.mSliderBackgroundDrawableRes = sliderBackgroundDrawableRes; return this; }
@Override public AccountDividerDrawerItem withIcon(@DrawableRes int iconRes) { return null; }
public ImageHolder(@DrawableRes int iconRes) { super(iconRes); }
T withIcon(@DrawableRes int iconRes);
/** * Image resource id to use for crop icon instead of text.<br> * <i>Default: 0</i> */ public ActivityBuilder setCropMenuCropButtonIcon(@DrawableRes int drawableResource) { mOptions.cropMenuCropButtonIcon = drawableResource; return this; } }
/** * Constructor * * @param title Title * @param resource Drawable resource */ public AHBottomNavigationItem(String title, @DrawableRes int resource) { this.title = title; this.drawableRes = resource; }
AppWidgetAction(Picasso picasso, Request data, @DrawableRes int errorResId, RemoteViewsTarget target, int[] appWidgetIds, @Nullable Callback callback) { super(picasso, data, errorResId, target, callback); this.appWidgetIds = appWidgetIds; }
BitmapTargetAction(Picasso picasso, BitmapTarget target, Request data, @Nullable Drawable errorDrawable, @DrawableRes int errorResId) { super(picasso, data); this.target = target; this.errorDrawable = errorDrawable; this.errorResId = errorResId; }
@Nullable Drawable load(@DrawableRes int resId); }
RemoteViewsAction(Picasso picasso, Request data, @DrawableRes int errorResId, @NonNull RemoteViewsTarget target, @Nullable Callback callback) { super(picasso, data); this.errorResId = errorResId; this.target = target; this.callback = callback; }
/** * Set the background for the Header as resource * * @param headerBackgroundRes */ public void setBackgroundRes(@DrawableRes int headerBackgroundRes) { mAccountHeaderBuilder.mAccountHeaderBackground.setImageResource(headerBackgroundRes); }
ImageViewAction(Picasso picasso, ImageView target, Request data, @Nullable Drawable errorDrawable, @DrawableRes int errorResId, boolean noFade, @Nullable Callback callback) { super(picasso, data); this.target = target; this.errorDrawable = errorDrawable; this.errorResId = errorResId; this.noFade = noFade; this.callback = callback; }
NotificationAction(Picasso picasso, Request data, @DrawableRes int errorResId, RemoteViewsTarget target, int notificationId, Notification notification, @Nullable String notificationTag, @Nullable Callback callback) { super(picasso, data, errorResId, target, callback); this.notificationId = notificationId; this.notificationTag = notificationTag; this.notification = notification; }
/** An error drawable to be used if the request image could not be loaded. */ @NonNull public RequestCreator error(@DrawableRes int errorResId) { if (errorResId == 0) { throw new IllegalArgumentException("Error image resource invalid."); } if (errorDrawable != null) { throw new IllegalStateException("Error image already set."); } this.errorResId = errorResId; return this; }
/** * Set the target image resource ID. * <p> * This will clear an image Uri if one is set. */ @NonNull public Builder setResourceId(@DrawableRes int resourceId) { if (resourceId == 0) { throw new IllegalArgumentException("Image resource ID may not be 0."); } this.resourceId = resourceId; this.uri = null; return this; }
static boolean isXmlResource(Resources resources, @DrawableRes int drawableId) { TypedValue typedValue = new TypedValue(); resources.getValue(drawableId, typedValue, true); CharSequence file = typedValue.string; return file != null && file.toString().endsWith(".xml"); }
/** * A placeholder drawable to be used while the image is being loaded. If the requested image is * not immediately available in the memory cache then this resource will be set on the target * {@link ImageView}. */ @NonNull public RequestCreator placeholder(@DrawableRes int placeholderResId) { if (!setPlaceholder) { throw new IllegalStateException("Already explicitly declared as no placeholder."); } if (placeholderResId == 0) { throw new IllegalArgumentException("Placeholder image resource invalid."); } if (placeholderDrawable != null) { throw new IllegalStateException("Placeholder image already set."); } this.placeholderResId = placeholderResId; return this; }
TestableRemoteViewsAction(Picasso picasso, Request data, @DrawableRes int errorResId, RemoteViewsTarget target, Callback callback) { super(picasso, data, errorResId, target, callback); }