Android Screen Adaptation course notes

Source: Internet
Author: User

1 Toggle Screen:
The file name is the same and the folder is different.
layout-port/Stands for vertical screen
layout-land/Representative Horizontal screen
layout/represents any layout folder that has no modifiers.


The final implementation of the product plan:
Two sets of identical names, one folder for different layouts.




2 when the screen switch:
The code needs to be judged by direction.
Because different layout.xml are used.
Therefore, code checking is required.






3 for the size of the setting. Recommended Use:


Layout + style + dimension form


Layout screen


Style to set the dimensions cannot describe the Shuxin g:march_parent


Dimension to define a fixed size




4 Screen Adaptation principles:


What about 1 Jin ke linerlayout relativelayout
The properties of the layout in. Weapons are aligned using Margin_parent, warp_conent, margin or relationlayout project layouts.


2 If you cannot use a comfortable size, use the DP property as much as possible.




5 SW screen will never rotate only focus on the shortest side!


1 large screens and small screens
The width is adapted in a values-w<xxx>dp manner.
A high degree of adaptation is performed using the VALUES-H&LT;XXX&GT;DP method.
Suitable for the shortest side length using the VALUES-SW&LT;XXX&GT;DP method




2 when SW&LT;XXX&GT;DP and H&LT;XXX&GT;DP all match,
Choose the resources of SW&LT;XXX&GT;DP!



Android Screen Adaptation course notes

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.