您的位置:首页 > 移动开发 > Android开发

Android应用开发之国际化

2012-02-29 17:59 417 查看
布局 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" />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: