aboutsummaryrefslogtreecommitdiff
path: root/library/src/main/java/com/bumptech/glide/DrawableOptions.java
blob: 2f8e3a4b91b4199bca17b44c2b8b344addb728e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.bumptech.glide;

import android.view.animation.Animation;

public interface DrawableOptions {

    /**
     * Applies a cross fade transformation that fades from the placeholder to the loaded
     * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead simply fade in.
     *
     * <p>
     *     Note - this only works by default for {@link android.view.View}s and
     *     {@link com.bumptech.glide.request.target.ViewTarget}s.
     * </p>
     *
     * @see #crossFade(int)
     * @see #crossFade(int, int)
     * @see #crossFade(android.view.animation.Animation, int)
     *
     * @return This request builder.
     */
     public GenericRequestBuilder<?, ?, ?, ?> crossFade();

    /**
     * Applies a cross fade transformation that fades from the placeholder to the loaded
     * {@link android.graphics.drawable.Drawable}. If no placeholder is set the Drawable will instead simply fade in.
     *
     * <p>
     *     Note - this only works by default for {@link android.view.View}s and
     *     {@link com.bumptech.glide.request.target.ViewTarget}s.
     * </p>
     *
     * @see #crossFade()
     * @see #crossFade(int, int)
     * @see #crossFade(android.view.animation.Animation, int)
     *
     * @param duration The duration of the cross fade and initial fade in.
     * @return This request builder.
     */
    public GenericRequestBuilder<?, ?, ?, ?> crossFade(int duration);


    /**
     * Applies a cross fade transformation that des from the placeholder to the loaded
     * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead be animated in
     * using the given {@link android.view.animation.Animation}.
     *
     * <p>
     *     Note - this only works by default for {@link android.view.View}s and
     *     {@link com.bumptech.glide.request.target.ViewTarget}s.
     * </p>
     *
     * @see #crossFade()
     * @see #crossFade(int)
     * @see #crossFade(int, int)
     *
     * @param animation The Animation to use if no placeholder is set.
     * @param duration The duration of the cross fade animation.
     * @return This request builder.
     */
    public GenericRequestBuilder<?, ?, ?, ?> crossFade(Animation animation, int duration);


    /**
     * Applies a cross fade transformation that des from the placeholder to the loaded
     * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead be animated in
     * using the {@link android.view.animation.Animation} loaded from the given animation id.
     *
     * <p>
     *     Note - this only works by default for {@link android.view.View}s and
     *     {@link com.bumptech.glide.request.target.ViewTarget}s.
     * </p>
     *
     * @see #crossFade()
     * @see #crossFade(int)
     * @see #crossFade(android.view.animation.Animation, int)
     *
     * @param animationId The id of the Animation to use if no placeholder is set.
     * @param duration The duration of the cross fade animation.
     * @return This request builder.
     */
    public GenericRequestBuilder<?, ?, ?, ?> crossFade(int animationId, int duration);
}