How do I make my ImageView a fixed size regardless of the size of the bitmap

前端 未结 3 1988
灰色年华
灰色年华 2020-12-28 13:03

So I\'m loading images from a web service, but the size of the images are sometimes smaller or bigger than other images and the visualization looks silly when I put them in

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 13:30

    Get ImageVIews as facebook posts.    
    Glide.with(context).load(link)
                        .placeholder(R.drawable.aboutlogo)
                        .fitCenter()
                        .diskCacheStrategy(DiskCacheStrategy.ALL)
                        .into(imageView);`
    
            
    

提交回复
热议问题