setRemoteDrawable

fun ImageView.setRemoteDrawable(uri: Uri?, placeholder: Drawable?, error: Drawable?)

A convenience binding adapter for setting a RemoteDrawable as the drawable for an ImageView, allowing the uri to be shown in the ImageView. If uri is null or not yet loaded, the placeholder will be shown even error is not null. If error is defined and the loading fails error will be shown. If uri, placeholder and error are not null and error happen during download first placeholder will be shown then after error occurs error will be shown.

NOTE: It is the client's responsibility to make sure the uri is secure and trusted.


fun ImageView.setRemoteDrawable(uri: Uri?, placeholder: Drawable?)

A convenience binding adapter for setting a RemoteDrawable as the drawable for an ImageView, allowing the uri to be shown in the ImageView. If uri is null or not yet loaded, the placeholder will be shown.

NOTE: It is the client's responsibility to make sure the uri is secure and trusted.