1package com.bumptech.glide.request.target;
2
3import android.graphics.Bitmap;
4import android.graphics.drawable.Drawable;
5import android.view.View;
6import com.bumptech.glide.Glide;
7import com.bumptech.glide.request.Request;
8
9/**
10 * A base {@link Target} for loading {@link Bitmap}s that provides basic or empty implementations for most methods.
11 *
12 * <p>
13 *     For maximum efficiency, clear this target when you have finished using or displaying the {@link Bitmap} loaded
14 *     into it using {@link Glide#clear(Target)}.
15 * </p>
16 *
17 * <p>
18 *     For loading {@link Bitmap}s into {@link View}s, {@link ViewTarget} is preferable to this class.
19 * </p>
20 */
21public abstract class BaseTarget<Z> implements Target<Z> {
22
23    private Request request;
24
25    @Override
26    public void setRequest(Request request) {
27        this.request = request;
28    }
29
30    @Override
31    public Request getRequest() {
32        return request;
33    }
34
35    @Override
36    public void setPlaceholder(Drawable placeholder) { }
37}
38