我正在開發一個應用程序,它需要兩種語言的支持(英語&北印度語)。我對英語設計很熟悉,但對於如何在印地語中創建用戶界面我沒有任何想法。如何在印地語中創建android用戶界面?
任何人都可以請幫助我如何創建android用戶界面在印地文......? 我想用以下的XML文件在印地文的意思是在名稱&密碼按照下面的圖像,我需要得到印地文單詞..但我保留印地文文本意味着它是顯示框代替用戶名&密碼。正如你可以在下面找到按鈕。創建了兩個動態文本視圖。英文文本正在顯示,但會顯示北印度文字顯示框。
main.xml中
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutbase"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30px"
android:text="Username"/>
<EditText
android:id="@+id/editText1"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</EditText>
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" >
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30px"
android:text="नमस्ते"/>
<EditText
android:id="@+id/editText2"
android:layout_weight="1"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</EditText>
</TableRow>
</TableLayout>
輸出顯示盒按如下圖
你需要針對Android 2.3及更高版本。那麼印地文字體應該可以訪問。 – Cheesebaron 2012-07-13 07:39:54
雅,我使用2.3,但不知道如何顯示印地文字體。 – 2012-07-13 07:40:40
根據這個錯誤報告,它不適用於每個2.3設備:https://code.google.com/p/android/issues/detail?id=4153它應該與ICS一起工作。這個線程描述瞭如何在你的應用中使用你自己的字體:http://stackoverflow.com/questions/4395309/android-want-to-set-custom-fonts-for-whole-application-not-runtime – Cheesebaron 2012-07-13 07:48:17