Posts

Showing posts with the label Android Glide

Android: Glide Not Showing Large Image From URL

Answer : I have found a solution that worked for my requirement. The override() method does the trick. Setting higher numbers for the target resolution seems to be the final workaround, but the bigger the numbers, the longer the time it would take to display the image(s), so it would be wise to implement a preloader/progressbar. Glide.with(getContext()) .asBitMap() //[for new glide versions] .load(url) //.asBitmap()[for older glide versions] //.placeholder(R.drawable.default_placeholder) .override(1600, 1600) // Can be 2000, 2000 .into(new BitmapImageViewTarget(imageViewPreview) { @Override public void onResourceReady(Bitmap drawable, GlideAnimation anim) { super.onResourceReady(drawable, anim); progressBar.setVisibility(View.GONE); } }); Custom centered preloader/progressbar placeholder indicator on relativeLayout xml: <ProgressBar android:id="@+id/progressBar" android:layout_wid...