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     *
14     * @return This request builder.
15     */
16     GenericRequestBuilder<?, ?, ?, ?> crossFade();
17
18    /**
19     * Applies a cross fade transformation that fades from the placeholder to the loaded
20     * {@link android.graphics.drawable.Drawable}. If no placeholder is set the Drawable will instead simply fade in.
21     *
22     * @see #crossFade()
23     * @see #crossFade(int, int)
24     *
25     * @param duration The duration of the cross fade and initial fade in.
26     * @return This request builder.
27     */
28    GenericRequestBuilder<?, ?, ?, ?> crossFade(int duration);
29
30
31    /**
32     * Applies a cross fade transformation that des from the placeholder to the loaded
33     * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead be animated in
34     * using the given {@link android.view.animation.Animation}.
35     *
36     * @see #crossFade()
37     * @see #crossFade(int)
38     * @see #crossFade(int, int)
39     *
40     * @deprecated If this builder is used for multiple loads, using this method will result in multiple view's being
41     * asked to start an animation using a single {@link android.view.animation.Animation} object which results in
42     * views animating repeatedly. Use {@link #crossFade(int, int)}} instead, or be sure to call this method once
43     * per call to {@link com.bumptech.glide.GenericRequestBuilder#load(Object)} to avoid re-using animation objects.
44     * Scheduled to be removed in Glide 4.0.
45     * @param animation The Animation to use if no placeholder is set.
46     * @param duration The duration of the cross fade animation.
47     * @return This request builder.
48     */
49    @Deprecated
50    GenericRequestBuilder<?, ?, ?, ?> crossFade(Animation animation, int duration);
51
52    /**
53     * Applies a cross fade transformation that des from the placeholder to the loaded
54     * {@link android.graphics.drawable.Drawable}. If no placeholder is set, the Drawable will instead be animated in
55     * using the {@link android.view.animation.Animation} loaded from the given animation id.
56     *
57     * @see #crossFade()
58     * @see #crossFade(int)
59     *
60     * @param animationId The id of the Animation to use if no placeholder is set.
61     * @param duration The duration of the cross fade animation.
62     * @return This request builder.
63     */
64    GenericRequestBuilder<?, ?, ?, ?> crossFade(int animationId, int duration);
65}
66