전체 안드로이드 응용 프로그램의 글꼴을 변경하는 방법이 있습니까?응용 프로그램 글꼴을 변경 하시겠습니까?
저는 changing TextView's font을 알고 있습니다. 모든 목록 뷰 항목, TextViews, ButtonTexts, ... 모든 활동의 글꼴 등을 변경하고 싶습니다.
그것에 대해 뭔가 할 수 있습니까? 그것은 매니페스트와 관련된 것입니까?
감사합니다.
전체 안드로이드 응용 프로그램의 글꼴을 변경하는 방법이 있습니까?응용 프로그램 글꼴을 변경 하시겠습니까?
저는 changing TextView's font을 알고 있습니다. 모든 목록 뷰 항목, TextViews, ButtonTexts, ... 모든 활동의 글꼴 등을 변경하고 싶습니다.
그것에 대해 뭔가 할 수 있습니까? 그것은 매니페스트와 관련된 것입니까?
감사합니다.
불행히도 전체 앱의 기본 글꼴을 설정하는 방법은 없습니다. 각보기에서 setTypeface(tf)
을 수행해야합니다.
또 다른 방법은 각보기 유형을 서브 클래스 화하고 this answer에서 제안 된대로 해당 생성자에 서체를 적용하는 것입니다.
하이 확인이이 http://developer.android.com/guide/topics/ui/themes.html
은 응용 프로그램의 스타일과 테마를 정의합니다.
사용자 정의 스타일 및 테마 만들기 및 다른 스타일과 테마
단일/다중 제어 설정하면이 내 main.xml에 파일
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:id="@+id/linear">
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content" android:text="@string/hello" style="@style/CodeFont"/>
<Button android:id="@+id/btn" android:layout_width="200dp"
android:layout_height="wrap_content" android:text="Click" style="@style/CodeFont"/>
<ImageView android:id="@+id/img_preview"
android:layout_width="fill_parent" android:layout_height="wrap_content" />
</LinearLayout>
이며,이 내 style.xml 파일
입니다<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CodeFont" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">#00FF00</item>
<item name="android:typeface">monospace</item>
</style>
</resources>
아직 말씀하신대로 지원되지 않는 것 같습니다. 감사. – iTurki