Add Extension Function That Supports ImageListener
@@ -9,6 +9,7 @@ package com.facebook.fresco.vito.ktx
import android.net.Uri
import android.view.View
+import com.facebook.fresco.vito.listener.ImageListener
import com.facebook.fresco.vito.options.ImageOptions
import com.facebook.fresco.vito.view.VitoView
@@ -20,6 +21,9 @@ object ViewExtensions {
fun View.show(uri: Uri, imageOptions: ImageOptions) = VitoView.show(uri, imageOptions, this)
+ fun View.show(uri: Uri, imageOptions: ImageOptions, imageListener: ImageListener) =
+ VitoView.show(uri, imageOptions, imageListener, null, this)
+
fun View.show(uri: Uri, imageOptions: ImageOptions, callerContext: Any) =
VitoView.show(uri, imageOptions, callerContext, this)
}
