[안드로이드 스튜디오] 폰트 설정
글꼴 모음을 리소스로 추가하기
<font
android:fontStyle="normal"
android:fontWeight="400"
android:font="@font/leeseoyun" />
일부 아이템만 글꼴 바꾸기
// layout xml 파일에서 해당 아이템 하위에 아래처럼 코드 작성
android:fontFamily="@font/leeseoyun"
일괄 적용하기
// themes.xml 파일에서 style 하위에 아래처럼 코드 작성
<item name="android:fontFamily">@font/leeseoyun</item>
참고
XML의 글꼴 | Android 개발자 | Android Developers
XML의 글꼴 Android 8.0(API 수준 26)에는 새로운 기능인 XML의 글꼴이 도입되어 글꼴을 리소스로 사용할 수 있습니다. res/font/ 폴더에 font 파일을 추가하여 글꼴을 번들로 묶어 리소스로 사용할 수 있습
developer.android.com
반응형
'개발(Android) > android studio' 카테고리의 다른 글
[Android Studio/Kotlin] View Binding (0) | 2022.05.02 |
---|---|
[Android Studio] (Vertical) Scroll View, Horizontal Scroll View, Nested Scroll View (0) | 2022.04.29 |
[Android Studio/Kotlin] Singleton Pattern (0) | 2022.04.20 |
[Android Studio/Kotlin] Custom Dialog, Interface (0) | 2022.04.20 |
[Android Studio/Kotlin] Listener, Method, Click Event (0) | 2022.04.18 |