2014-03-01 28 views
-1

XML文件的Android TextView中沒有顯示印地文文本

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@color/holo_blue_green" 
    android:orientation="vertical" > 

       <TextView 
        android:id="@+id/tv_question" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:ellipsize="none" 
        android:text="………यांच्या मते १८५७ चा उठाव म्हणजे 「भारतीयाचे पहिले स्वातंत्रयुद्ध 」 होय ." 
        android:textColor="@android:color/black" 
        android:textStyle="bold" /> 
</LinearLayout> 

enter image description here

भारतीयाचे全字體 - 這個詞是不完整的。

+0

你能發佈完整的佈局文件代碼嗎? – GrIsHu

+0

是的,我更新了代碼請檢查它@GrIsHu – SKR

+0

嘗試使用一些其他的印地文字體或只是刪除txtQues.setTypeface(_maratiTypeface); –

回答

0

更改編碼爲「Windows-1250」

+0

它does not工作@marson – SKR

0

嘗試動態添加你的文字,或者你只是粘貼文本在Eclipse文本編輯器,並檢查看看是如何顯示在該視圖它顯示了同樣的觀點後什麼步驟1:將您的TTf文件粘貼到Assets文件夾中,並在名稱下面輸入名稱字體/ Verdana.ttf 步驟2:並動態使用您的字體...像下面那樣

TextView myTextView=(TextView)findViewById(R.id.textBox); 
Typeface typeFace=Typeface.createFromAsset(getAssets(),"fonts/mytruetypefont.ttf"); 
myTextView.setTypeface(typeFace); 

全部最好

+0

我們試過這個,但它沒有工作。 – SKR

相關問題