Android left top right bottom mscrollx mscrolly coordinates explained

Source: Internet
Author: User
Android View left top right bottom mscrollx mscrolly coordinates view left top right Bottom

The left top right bottom of Android view is relative to the parent's spatial data

View MSCROLLX mscrolly

We know three important stages of the view drawing:

1. Measure: Pre-estimate the space occupied by each view of the Viewtree.

2. Layout: Determine the spatial location of each view in the Viewtree, including Width,height,left,top,right,bottom

3. Draw: Use a Mglcanvas object in Rootview as the canvas, and all the view on the Viewtree is drawn on this canvas, it is worth noting that if

The area of the drawing exceeds the screen, and Android does not display these drawn content.

In Android view, the original intent of mscrollx,mscrolly is

Mscrollx/mscrolly the vertical/horizontal pixel offset relative to the view's content (text, picture, sub-view). Such as:

After setting the mscrollx/mscrolly, you can scroll to the specified "content", and mscrollx/mscrolly is the offset from the "content".

The content origin is (0,0).

    

Android left top right bottom mscrollx mscrolly coordinates explained

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.