| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- DART
- gemini-cli
- 파이썬
- androidx
- Gemini
- kotlin
- Firebase
- FSM
- 이모지메모
- 오픈소스
- 공부집중
- jetpack compose
- Android
- 장자명언
- Linux
- 코틀린
- 명언
- Flutter
- 좋은글필사하기
- 생성AI
- ASMR
- 명언모음
- javascript
- ChatGPT
- 오늘의역사
- 소울칼리버6
- Coroutine
- 명상명언
- 명심보감
- Freesound
Archives
- Today
- Total
Vintage appMaker의 Tech Blog
[Android] 커스텀 폰트 사용시, 강제로 TextView의 패딩이 들어가는 현상 본문
Source code or Tip/Android(Java, Kotlin)
[Android] 커스텀 폰트 사용시, 강제로 TextView의 패딩이 들어가는 현상
VintageappMaker 2020. 12. 14. 21:33커스텀 폰트 사용시, 전체적으로 패딩이 들어가는 현상이 나올 때가 있다. 이 때에는 다음과 같은 작업을 해주어야 한다.
- android:includeFontPadding을 false로 한다.
- 전체 스타일에 android:Widget.TextView에서 구현하는 것이 좋다.
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textViewStyle">@style/notosanTextView</item>
<item name="android:buttonStyle">@style/notosanButton</item>
<item name="android:statusBarColor">@color/transparent</item>
<item name="windowNoTitle">true</item>
</style>
<style name="notosanTextView" parent="android:Widget.TextView">
<item name="android:includeFontPadding">false</item>
<item name="android:fontFamily">@font/notosan_demilight</item>
'Source code or Tip > Android(Java, Kotlin)' 카테고리의 다른 글
| Android App shortcut 만들기 (0) | 2020.12.24 |
|---|---|
| kotlin에서 xml의 ID로 변수를 자동으로 읽어오지 못할 때 (0) | 2020.12.22 |
| ADB를 이용한 Android와 PC 통신 (0) | 2020.12.13 |
| [kotlin] RecyclerView full size capture - 코틀린 변환 (0) | 2020.08.16 |
| [Link] Android Bitmap에 워터마크 추가하기 (0) | 2020.08.12 |
Comments