mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
listener is now field on ImageView (#93)
This commit is contained in:
@@ -160,18 +160,21 @@ public class ImageView extends android.widget.ImageView {
|
||||
}
|
||||
}
|
||||
|
||||
public void setUri(String uri, int decodeWidth, int decodeHeight, boolean useCache, boolean async, Worker.OnImageLoadedListener listener) {
|
||||
public void setUri(String uri, int decodeWidth, int decodeHeight, boolean useCache, boolean async) {
|
||||
mUri = uri;
|
||||
mDecodeWidth = decodeWidth;
|
||||
mDecodeHeight = decodeHeight;
|
||||
mUseCache = useCache;
|
||||
mAsync = async;
|
||||
mListener = listener;
|
||||
if (mAttachedToWindow) {
|
||||
loadImage();
|
||||
}
|
||||
}
|
||||
|
||||
public void setImageLoadedListener(Worker.OnImageLoadedListener listener) {
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
private void loadImage() {
|
||||
Fetcher fetcher = Fetcher.getInstance(this.getContext());
|
||||
if (mUri != null && fetcher != null) {
|
||||
|
||||
Reference in New Issue
Block a user