Android应用开发之国际化
Android应用开发之国际化
布局 main.xml
- <TextView
- Android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/hello" />
- <ImageButton
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/exit"/>
字符串国际化
values-zh
- <string name="hello">你好!</string>
- <string name="app_name">国际化</string>
values-en
- <string name="hello">Hello World, I18nActivity!</string>
- <string name="app_name">I18n</string>
values-en-rUS
- <string name="hello">Hello World, I18nActivity!,US</string>
- <string name="app_name">I18n</string>
图片国际化
屏幕适配
Layout-320x240
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="320x240" />
Layout-480x320
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="480x320" />
评论暂时关闭