DrawableOptions.java revision 2896f4261b305efc0da164314fb90eb75bf5a234
1package com.bumptech.glide; 2 3import android.view.animation.Animation; 4 5interface DrawableOptions { 6 7 /** 8 * Applies a cross fade transformation that fades from the placeholder to the loaded 9 * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead simply fade in. 10 * 11 * @see #crossFade(int) 12 * @see #crossFade(int, int) 13 * @see #crossFade(android.view.animation.Animation, int) 14 * 15 * @return This request builder. 16 */ 17 public GenericRequestBuilder<?, ?, ?, ?> crossFade(); 18 19 /** 20 * Applies a cross fade transformation that fades from the placeholder to the loaded 21 * {@link android.graphics.drawable.Drawable}. If no placeholder is set the Drawable will instead simply fade in. 22 * 23 * @see #crossFade() 24 * @see #crossFade(int, int) 25 * @see #crossFade(android.view.animation.Animation, int) 26 * 27 * @param duration The duration of the cross fade and initial fade in. 28 * @return This request builder. 29 */ 30 public GenericRequestBuilder<?, ?, ?, ?> crossFade(int duration); 31 32 33 /** 34 * Applies a cross fade transformation that des from the placeholder to the loaded 35 * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead be animated in 36 * using the given {@link android.view.animation.Animation}. 37 * 38 * @see #crossFade() 39 * @see #crossFade(int) 40 * @see #crossFade(int, int) 41 * 42 * @param animation The Animation to use if no placeholder is set. 43 * @param duration The duration of the cross fade animation. 44 * @return This request builder. 45 */ 46 public GenericRequestBuilder<?, ?, ?, ?> crossFade(Animation animation, int duration); 47 48 49 /** 50 * Applies a cross fade transformation that des from the placeholder to the loaded 51 * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead be animated in 52 * using the {@link android.view.animation.Animation} loaded from the given animation id. 53 * 54 * @see #crossFade() 55 * @see #crossFade(int) 56 * @see #crossFade(android.view.animation.Animation, int) 57 * 58 * @param animationId The id of the Animation to use if no placeholder is set. 59 * @param duration The duration of the cross fade animation. 60 * @return This request builder. 61 */ 62 public GenericRequestBuilder<?, ?, ?, ?> crossFade(int animationId, int duration); 63} 64