[Android beginners] 5. How to Use Controls-ImageView, android-imageview
Start Android
1. Basic concepts of Image view 2. <InameView/> and ImageView 3. Magic ScaleType attribute when the image size does not match the ImageView size, you can use this attribute to adjust the location relationship between the image and the ImageView control.
Android: scaleType:
Android: scaleType controls how images are resized/moved to match the size of ImageView.
ImageView. ScaleType/android: the differences between scaleType values:
CENTER/center is centered according to the original size of the image. When the length/width of the image exceeds the length/width of the View, the CENTER part of the captured image is displayed.
CENTER_CROP/centerCrop scales up the image size in the center, so that the image length (width) is equal to or greater than the View length (width)
CENTER_INSIDE/centerInside shows the entire content of the image in the center. The image length/width is equal to or less than the View length/width by proportional reduction or the original size.
FIT_CENTER/fitCenter scales up/down the image proportionally to the width of the View and center the image.
FIT_END/fitEnd: scales up or down an image to the width of the View, which is displayed in the lower part of the View.
FIT_START/fitStart scales up/down an image proportionally to the width of the View.
FIT_XY/fitXY increase or decrease the image size proportionally to the View size.
MATRIX/matrix is drawn using a MATRIX to dynamically zoom in and zoom in images.
Note that the names of images in the Drawable folder cannot be capitalized.
1. Use the <ImageView/> label in the XML file
2. Use the ImageView object in the code
How does android draw points on the imageview control?
Android: scaleType:
Android: scaleType controls how images are resized/moved to match the size of ImageView.
ImageView. ScaleType/android: the differences between scaleType values:
CENTER/center is centered according to the original size of the image. When the length/width of the image exceeds the length/width of the View, the CENTER part of the captured image is displayed.
CENTER_CROP/centerCrop scales up the image size in the center, so that the image length (width) is equal to or greater than the View length (width)
CENTER_INSIDE/centerInside displays the image content in the center, scale down the image size proportionally or make the image length/width equal to or less than the View length/width FIT_CENTER/fitCenter to scale up/down the image to the View width in the center.
FIT_END/fitEnd: scales up or down an image to the width of the View, which is displayed in the lower part of the View.
FIT_START/fitStart scales up/down an image proportionally to the width of the View.
FIT_XY/fitXY? Scale up or down to display the View Size in proportion
MATRIX/matrix is drawn using a MATRIX to dynamically zoom in and zoom in images. ** Note,
The names of images in the Drawable folder cannot be capitalized.
How to draw points on the ImageView control in android Development
Write a class that inherits from ImageView and overwrite its OnTouch () and OnDraw () classes. The first class gets the touch point, and the last class is drawn at this point.