Android: universal: Text and image and screen adaptation

Source: Internet
Author: User
Tags i18n
ArticleDirectory
    • String
    • Image

 

Related content: Android: Unit: dip, PX, PT, SP

Android: style and theme

Android: Landscape | portrait switchover

String


 

 

Values-ZH // Chinese

 

  1. string name = " hello " > hello! string
  2. <String Name="App_name">Internationalization</String>

 

Values-en // english

 

  1. string name = " hello " > Hello world, i18nactivity! string
  2. <String Name="App_name">I18n</String>

 

 

 

Values-en-rus // english, USA

 

  1. string name = " hello " > Hello world, i18nactivity !, US string
  2. <String Name="App_name">I18n</String>

 

Image

 

Note that the file name is the same

 

Screen Adaptation



Layout-320x240 (large front)

You can also use layout-land. Layout-port to define different screen interfaces.

You can configure different interfaces in layout with different resolutions.

E.g.

Layout-320x240

 

  1. <Textview
  2. Android: layout_width="Fill_parent"
  3. Android: layout_height="Wrap_content"
  4. Android: Text="320x240" />

 

Layout-480x320

 

    1. <Textview
    2. Android: layout_width="Fill_parent"
    3. Android: layout_height="Wrap_content"
    4. Android: Text="480x320" /> 

 

 

Reference: http://www.linuxidc.com/Linux/2012-03/55562.htm

Http://blog.csdn.net/me15933550973/article/details/7173698

Related Article

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.