나는이 사용자 정의 글꼴을 (Kulturista Bold. ttf) 추가하려고하는데 안드로이드 응용 프로그램을 개발했지만 작동하지 않습니다. 여기에 내 login.xml 파일과 login.java가 있습니다. 파일안드로이드 액티비티에 새 글꼴을 추가하는 방법
<TextView
android:id="@+id/maintitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="CREATE AN ACCOUNT?"
android:textColor="@color/blue"
android:textSize="25dp"
android:layout_gravity="center"
android:layout_marginTop="70dp"
android:gravity="center"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="CLICK ON THE SIGHNUP AND REGISTER"
android:textColor="#c4cbcf"
android:layout_gravity="center"
android:gravity="center"
/>
이 벗기는하여이 작업을 시도
//Space between dot(.) and ttf Kulturista_Bold. ttf
Typeface font1 = Typeface.createFromAsset(getAssets(), "Kulturista_Bold. ttf");
"ttf 글꼴."활동 코드를에서
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
TextView txt1 = (TextView) findViewById(R.id.maintitle);
Typeface font1 = Typeface.createFromAsset(getAssets(), "Kulturista_Bold. ttf");
txt1.setTypeface(font1);
TextView txt2 = (TextView) findViewById(R.id.subtitle);
Typeface font2 = Typeface.createFromAsset(getAssets(), "Kulturista_Bold. ttf");
txt2.setTypeface(font2);
}
}
과 같은 사용자 글꼴은이 'Kulturista_Bold와 같은 저작물 폴더와 같습니다. ttf' 한 번 이름을 확인해 보라.'Kulturista_Bold.ttf' – NagarjunaReddy
'ttf' 파일은 어디에 있습니까? 자산 폴더에 있습니까? –