會出現此問題,主要是因為使用的xml檔案中有沒有考慮到多國語系的問題

如下:因為在TextView中屬性text是設定成固定的內容"this will make error"所造成的


a.xml
<TextView
android:id="@+id/myTextView1"
android:text="this will make error"
android:layout_width="fill_parent">
</TextView>


因此必須改為利用在res/values/string.xml中定義顯示的文字內容"this will ok"後,再將原text改為@string/str_info即可

res/values/string.xml
<string name="str_info">this will ok</string>

a.xml
<TextView
android:id="@+id/myTextView1"
android:text="@string/str_info"
android:layout_width="fill_parent">
</TextView>

arrow
arrow
    全站熱搜

    狼翔月影 發表在 痞客邦 留言(0) 人氣()