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; }
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; }
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"); }
TestableRemoteViewsAction(Picasso picasso, Request data, @DrawableRes int errorResId, RemoteViewsTarget target, Callback callback) { super(picasso, data, errorResId, target, callback); }
/** * Configure {@code intent} with the extras needed to initialize this transition. */ public static void addExtras(@NonNull Intent intent, @ColorInt int fabColor, @DrawableRes int fabIconResId) { intent.putExtra(EXTRA_FAB_COLOR, fabColor); intent.putExtra(EXTRA_FAB_ICON_RES_ID, fabIconResId); }
/** Start building a request using the specified resource ID. */ public Builder(@DrawableRes int resourceId) { setResourceId(resourceId); }
@Override public void setImageResource(@DrawableRes int resId) { super.setImageResource(resId); initializeBitmap(); }
@Override public ProfileSettingDrawerItem withIcon(@DrawableRes int iconRes) { this.icon = new ImageHolder(iconRes); return this; }
/** * Start an image request using the specified drawable resource ID. * * @see #load(Uri) * @see #load(String) * @see #load(File) */ @NonNull public RequestCreator load(@DrawableRes int resourceId) { if (resourceId == 0) { throw new IllegalArgumentException("Resource ID must not be zero."); } return new RequestCreator(this, null, resourceId); }
@Override public MiniProfileDrawerItem withIcon(@DrawableRes int iconRes) { this.icon = new ImageHolder(iconRes); return this; }
public FabTransform(@ColorInt int fabColor, @DrawableRes int fabIconResId) { color = fabColor; icon = fabIconResId; setPathMotion(new GravityArcMotion()); setDuration(DEFAULT_DURATION); }