Android makes ImageView fill the entire control method

Source: Internet
Author: User

Add in the ImageView.

Android:scaletype= "Fitxy"

On it, it will not be left up and down.

Explain what ScaleType means.

Scaletype= "Matrix" is to keep the original size, starting at the point in the upper left corner, drawing in matrix form.

Scaletype= "Fitxy" is drawn after stretching the original image in a transverse direction (that is, the xy direction).

Scaletype= "Fitstart" is a scaled original drawing of the original image along the upper-left corner (that is, the point at which the matrix mode drawing starts).

Scaletype= "Fitcenter" is the point at which the original image is centered along the top (that is, the center point of the first line of the Matrix Drawing), and the original drawing is scaled proportionally.

Scaletype= "Fitend" is the point at which the original image is centered along the bottom (that is, the center point of the last line of the matrix drawing), scaled by the original drawing.

The scaletype= "center" is the size of the original image, with the geometric center point of the original and the geometric center point of the Imagview as the benchmark, drawing only the Imagview size.

Scaletype= "Centercrop" does not maintain the original size, with the geometric center point of the original image and the geometric center point of the Imagview as the benchmark, only the Imagview-sized images are drawn (to fill
Imagview as the target, crop the original image).

Scaletype= "Centerinside" does not maintain the original size, and is based on the geometric center point of the original image and the geometric center point of the Imagview, drawing only images of the Imagview size (to show
The full picture is the target and the original image is scaled).

Android makes ImageView fill the entire control method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.