We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am trying to Accomplish Something Like this:
Load Image from a URL asFile then copy that file for later Use and and also load same Image.
If I do following using Drawable the image obtaines as File is of Low Res than original.
Glide .with(imgView) .asFile() .load(imgUri) .placeholder(R.drawable.ic_song_placeholder) .error(R.drawable.ic_musicplaceholder) .listener(object:RequestListener<File>{ override fun onLoadFailed( e: GlideException?, model: Any?, target: Target<File>?, isFirstResource: Boolean ): Boolean { log("Glide","LoadFailed") return false } override fun onResourceReady( resource: File?, model: Any?, target: Target<File>?, dataSource: DataSource?, isFirstResource: Boolean ): Boolean { CoroutineScope(Dispatchers.Main).launch { try { val file = File(/*File Path*/) resource?.copyTo(file) Glide.with(imgView) .load(file) .placeholder(R.drawable.ic_song_placeholder) .into(imgView) } catch (e: IOException) { e.printStackTrace() } } return false } }).submit() }
The text was updated successfully, but these errors were encountered:
Duplicate of #172
Sorry, something went wrong.
No branches or pull requests
I am trying to Accomplish Something Like this:
Load Image from a URL asFile then copy that file for later Use and and also load same Image.
If I do following using Drawable the image obtaines as File is of Low Res than original.
The text was updated successfully, but these errors were encountered: