Android Multi-machine adaptation

Source: Internet
Author: User

one, multi-lingual support

The prerequisite is not to hard-code, the string should be put into the strings.xml.

Then, when multilingual support is required, the language is differentiated by the name of the Res/values folder.

Like what:

Simplified Chinese is VALUES-ZH-RCN

Traditional Chinese is VALUES-ZH-RTW

English is Values-en


Reference:

Android apps support multi-device http://blog.csdn.net/ekeuy/article/details/12195185

Android app development multi-language folder http://www.2cto.com/kf/201302/190394.html

Multi-language implementation of Android http://blog.csdn.net/barryhappy/article/details/23436527


Two, support multi-screen size

1, make sure the system can properly adjust the size of your layout to fit the screen,

2, according to the screen configuration to provide the appropriate user interface layout

3. Make sure the correct layout is applied to the correct screen

4, provide bitmap that can be scaled correctly


Suggestions:

1, use "wrap_content" and "Match_parent"

2, using relative layout

3, using the dimension qualifier

4, using the minimum width qualifier

5, using layout aliases

6, using the screen orientation qualifier

7, using auto-stretch bitmap


Reference:

Android Fragment Detailed http://blog.csdn.net/wangjinyu501/article/details/9315139

Supports tablets and mobile phones http://wiki.eoeandroid.com/Supporting_Tablets_and_Handsets

Supports various screen sizes http://wiki.eoeandroid.com/Supporting_Different_Screen_Sizes

Configuration Qualifier Http://developer.android.com/intl/zh-cn/guide/practices/screens_support.html#qualifiers

How Android matches Resources Http://developer.android.com/intl/zh-cn/guide/topics/resources/providing-resources.html#BestMatch

Qualifier Priority Http://developer.android.com/intl/zh-cn/guide/topics/resources/providing-resources.html#table2


third, support multi-platform version

1, specify the minimum and target version API levels

New versions of Android systems, some system styles and user habits may change. In order for your app to take full advantage of these changes and make sure your app adapts to the style of the various devices, you should make the Targetsdkversion value in the app match the latest version of the Android system.

2. Check the version of the system when the device is running

Andorid provides a unique code for each platform in the build constant class.

3. Check the app's behavior under art

System.getproperty ("Java.vm.version"). If ART is on use, the property's value is "2.0.0" or higher.


Reference:

Android L http://blog.csdn.net/jhg19900321/article/details/36382019

Android Multi-machine adaptation

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.