2014-01-26 2 views
0

을 구문 분석 할 수없는 내가 추가 한 힌디어 .TTF 파일에서 힌디어 텍스트를 표시하려면 여기에 응용 프로그램내가 자산에 안드로이드하지만

public class NanTV extends TextView{ 

private Context c; 
public NanTV(Context c) { 
     super(c); 
    this.c = c; 
    Typeface tfs = Typeface.createFromAsset(c.getAssets(), 
      "vigyapti.ttf"); 
    setTypeface(tfs); 

    } 
public NanTV(Context context, AttributeSet attrs, int defStyle) { 
    super(context, attrs, defStyle); 
    this.c = context; 
    Typeface tfs = Typeface.createFromAsset(c.getAssets(), 
      "vigyapti.ttf"); 
    setTypeface(tfs); 
    // TODO Auto-generated constructor stub 
} 

public NanTV(Context context, AttributeSet attrs) { 
    super(context, attrs); 
    this.c = context; 
    Typeface tfs = Typeface.createFromAsset(c.getAssets(), 
      "vigyapti.ttf"); 
    setTypeface(tfs); 

} 

} 내 코드와 나는 그것을 표시 할 때 이

public class NanTV extends TextView{ 

private Context c; 
public NanTV(Context c) { 
    super(c); 
    this.c = c; 
    Typeface tfs = Typeface.createFromAsset(c.getAssets(), 
      "vigyapti.ttf"); 
    setTypeface(tfs); 

} 
public NanTV(Context context, AttributeSet attrs, int defStyle) { 
    super(context, attrs, defStyle); 
    this.c = context; 
    Typeface tfs = Typeface.createFromAsset(c.getAssets(), 
      "vigyapti.ttf"); 
    setTypeface(tfs); 
    // TODO Auto-generated constructor stub 
} 

    public NanTV(Context context, AttributeSet attrs) { 
    super(context, attrs); 
    this.c = context; 
    Typeface tfs = Typeface.createFromAsset(c.getAssets(), 
      "vigyapti.ttf"); 
     setTypeface(tfs); 

    } 

하고 내가 그것을

01-26 14:18:27.090: E/AndroidRuntime(266): FATAL EXCEPTION: main 
01-26 14:18:27.090: E/AndroidRuntime(266): java.lang.RuntimeException: Unable to start  activity ComponentInfo{example.login/example.login.LoginActivity}: 

android.view.InflateException: Binary XML file line #8: Error inflating class  
com.nannu.NanTV 

에 다음과 같은 오류가 점점 오전 같은 활동 파일에 텍스트 뷰 여기 내 레이아웃 파일입니다

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:orientation="vertical" 
> 

    <com.nannu.NanTV 
    android:id="@+id/textView1" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textAppearance="?android:attr/textAppearanceLarge" 

    /> 

내가 빠른 졸을 감사를 필요로하는 친절이 나를 도와!

답변

0

OpenTypeFont 파일 글꼴 사용 시도

관련 문제