0
我正在試圖添加印度語言。當我使用setText時它工作正常。如何從字符串文件中調用印度語?
name=(EditText)loginView.findViewById(R.id.edittext_driver_lname);
name.setText("fMþ @ûCU");
如果我添加這些相同的文本字符串文件並嘗試調用,那麼它沒有得到正確的值。
<string name="frg_lgn_btn_go_online">fMþ @ûCU</string>
我可以知道這是什麼原因。我更喜歡調用字符串文件而不是添加setText。如何解決這個問題。
<EditText
android:id="@+id/edittext_driver_lname"
android:layout_width="@dimen/login_edittext_width"
android:layout_height="wrap_content"
android:layout_below="@+id/edittext_driver_fname"
android:layout_centerHorizontal="true"
android:layout_margin="@dimen/min_margin_elements"
android:text="@string/frg_lgn_btn_go_online"
android:inputType="text" />
我需要在java中使用xml設置文本而不是setText。
其工作字精唯一問題。如何@開始上懸而未決這個問題...例如@ û ´ ê˚Fû^þ èüâ û柯.... – praj
嗯,這很奇怪。 @不是xml中的轉義字符......你可以嘗試在@ ..前放置一個空白空間嗎? –