Implementation method of fixed width height ratio of Android ImageView
Implementation method of fixed width height ratio of Android ImageView
This article mainly introduces the fixed aspect ratio of ImageView,
Method 1: set adjustviewbounds = "true",
Method 2: use the universal image loader image cache class. It should be noted that the setting is invalid if method 2 and method 1 are used at the same time.
Method 1: set adjustviewbounds = "true"
Method 2: use the universal image loader image cache class
. imagescaletype (imagescaletype imagescaletype) is to set the zoom mode of the picture. The zoom type is magescaletype:
Note: after testing, method 2 and method 1 are used at the same time, resulting in invalid settings.
Thank you for reading. I hope it can help you. Thank you for your support for this site. There are many articles on Android Development on this site. I hope you can search and consult and make common progress!