1package com.bumptech.glide.request.target; 2 3/** 4 * A simpler interface for targets with default (usually noop) implementations of non essential methods that allows the 5 * caller to specify an exact width/height. 6 */ 7@SuppressWarnings("unused") 8public abstract class SimpleTarget<Z> extends BaseTarget<Z> { 9 private final int width; 10 private final int height; 11 12 public SimpleTarget(int width, int height) { 13 this.width = width; 14 this.height = height; 15 } 16 17 @Override 18 public final void getSize(SizeReadyCallback cb) { 19 cb.onSizeReady(width, height); 20 } 21} 22