1 package com.bumptech.glide.request.target; 2 3 import android.graphics.Bitmap; 4 import android.graphics.drawable.Drawable; 5 import android.view.View; 6 import com.bumptech.glide.Glide; 7 import 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 */ 21 public abstract class BaseTarget<Z> implements Target<Z> { 22 23 private Request request; 24 25 @Override setRequest(Request request)26 public void setRequest(Request request) { 27 this.request = request; 28 } 29 30 @Override getRequest()31 public Request getRequest() { 32 return request; 33 } 34 35 @Override setPlaceholder(Drawable placeholder)36 public void setPlaceholder(Drawable placeholder) { } 37 } 38