Resize images with Glide in a ImageView Android

前端 未结 6 1234
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-14 16:24

I have a lot of doubts about the treatment of the images in android, and I was hoping to see if you could solve them.

At this point I have an image that occupies 320

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 16:55

    you have to do the following with your imageview :

            
    

    and this with your glide :

        Glide.with(getBaseContext())
                .load(path)
                //.placeholder(R.drawable.drawable)
                .error(R.drawable.noimg)
                .animate(R.anim.animation_fade_in)
                .into(mImageView);
    

    This works perfectly with me .

提交回复
热议问题