RemoteDrawable
A LiveDataDrawable that resolves its LiveData contents from the given URI.
NOTE: By default, the drawable will be downloaded as its original size. When the uri
represents a vector drawable, its original/ intrinsic size could be smaller than the view to be attached. This results in a blurry or pixelated appearance in the UI. In this case, targetView
can be assigned as an indicator to specify the dimensions of the target view for this drawable.
Parameters
The context used for downloading the drawable from the URI.
The URI to download the drawable from.
The drawable to show before the drawable from the URI has been downloaded.
The target view for the drawable. When a target view is given, the remote drawable will be downloaded as large as the dimension of the target view. When this is null
, the remote drawable will be downloaded as its original size.