blob: b3e2e8b756b2bd019a010ce5e3aa40af0e45c16e [file] [log] [blame]
package com.bumptech.glide.request.target;
/**
* A simpler interface for targets with default (usually noop) implementations of non essential methods that allows the
* caller to specify an exact width/height.
*/
@SuppressWarnings("unused")
public abstract class SimpleTarget<Z> extends BaseTarget<Z> {
private final int width;
private final int height;
public SimpleTarget(int width, int height) {
this.width = width;
this.height = height;
}
@Override
public final void getSize(SizeReadyCallback cb) {
cb.onSizeReady(width, height);
}
}