I want to keep all the transformation, stoke and animations identical and was thinking if we can pass resource ID or asset name in Glide to load it locally?
To simply load an image to LinearLayout, we call the with() method of Glide class and pass the context, then we call the load() method, which contains the URL of the image to be downloaded and finally we call the into() method to display the downloaded image on our ImageView.
For resource ids, you can use:
Glide.with(fragment) .load(R.drawable.resource_id) .into(imageView);
For assets, you can construct an asset uri:
Glide.with(fragment) .load(Uri.parse("file:///android_asset/<assetName>")) .into(imageView);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With