[AI 앱 개발] v2v: value to value (Android Studio - Font 적용)

danbibibi·2022년 8월 9일
0

Android Studio - Font 적용

안드로이드 스튜디오에서 원하는 폰트를 사용하기 위한 방법을 알아보자.

  1. res > new > Directory > font 파일 생성

  1. 위에서 만든 font 디렉토리에 내가 사용할 폰트들을 넣어준다.

  2. font 디렉토리 안에 font.xml 파일을 만들고 다음과 같이 적어 준다.

<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:android="http://schemas.android.com/apk/res/android">
    <font android:fontStyle="normal"
        android:fontWeight="400"
        android:font="@font/appfont"/>
</font-family>
  1. 아래와 같이 폰트를 사용한다.
android:fontFamily="@font/appfont"

profile
블로그 이전) https://danbibibi.tistory.com

0개의 댓글