Android and android Official Website

Source: Internet
Author: User

Android and android Official Website
Resource xml files are adapted to different versions


Address: http://blog.csdn.net/caroline_wendy


Adapt layout to Android platform or API level: Adapt the layout file to different API levels to avoid warnings. By setting different API levelsDifferent folders (layout-v4), To adapt, you can remove the Warning.
Specifically: If what you're trying to do is show a different layout depending on which API version is available on the device, you want to use configuration qualifiers. the specifics for alternative resources are also incluented.
The most basic way to do it is to create a layout folder for each API level you want to use, formatted as follows:
Res/layout/mylayout. xml (Default) res/layout-v4/mylayout. xml (Android 1.6) res/layout-v11/mylayout. xml (Android 3.0) and so on, where vN is the API level. the specific API levels can be found on this page.
Reference: http://stackoverflow.com/questions/6536079/adapt-layout-to-android-platform-or-api-level

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.