| μΌ | μ | ν | μ | λͺ© | κΈ | ν |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |
- intArray
- text
- REST API
- κ΅°λ github
- Encoding
- Logμλ¦Ό
- DataBinding
- κ΅°λκ°λ°
- κ΅°λ κΉνλΈ
- okhttp
- Status Bar
- BindingAdapter
- android studio cloud
- Compose
- multipart
- μ€λ₯
- λ€νΈμν¬
- android μ€λ₯
- κ΅°λ κ°λ°
- λλ²κΉ μ€λ₯
- Di
- log
- kotlin
- Android
- Rest
- κ΅°λμμ μλλ‘μ΄λ κ°λ°
- apollo
- λ·° κ²ΉμΉ¨
- interface
- RETROFIT
- Today
- Total
KDY
Android Compose Text λ³Έλ¬Έ
π Jetpack Compose Text κΈ°λ³Έ μ¬μ©λ²
μ΄λ² ν¬μ€ν
μμλ Text μ»΄ν¬μ λΈμ μ¬μ©νμ¬ ν
μ€νΈ μ€νμΌμ μ€μ νλ λ°©λ²μ λ¨κ³λ³λ‘ μκ°ν΄λ릴κ²μ π
1. μμ μ§μ νκΈ°
color μμ±μΌλ‘ ν
μ€νΈμ μμμ μ§μ ν μ μμ΄μ.
Text(color = Color.Red, text = "Hello")
μ μ½λλ ν μ€νΈ μμμ λΉ¨κ°μμΌλ‘ μ§μ ν μμ λλ€.
2. ν΄μκ°μΌλ‘ μμ μ§μ
ARGB νμμ 16μ§μ ν΄μκ°μΌλ‘ μμμ μ§μ μ λ ₯ν μλ μμ΄μ.
Text(color = Color(0xfff999bb), text = "Hello")
ff: μν(ν¬λͺ λ)f999bb: RGB κ°
3. κΈμ ν¬κΈ° μ‘°μ
fontSize μμ±μΌλ‘ ν
μ€νΈ ν¬κΈ°λ₯Ό μ€μ ν΄μ.
Text(text = "Hello", fontSize = 30.sp)
4. ν μ€νΈ λκ»
fontWeightλ‘ κΈμμ κ΅΅κΈ°λ₯Ό μ‘°μ ν μ μμ΄μ.
Text(text = "Hello", fontWeight = FontWeight.Bold)
5. ν°νΈ λ³κ²½
fontFamily μμ±μΌλ‘ λ€μν ν°νΈλ₯Ό μ μ©ν΄λ³΄μΈμ.
Text(text = "Hello", fontFamily = FontFamily.Cursive)
β 6. λ¬Έμ κ°κ²©
letterSpacingμ κΈμ μ¬μ΄μ κ°κ²©μ μ‘°μ ν©λλ€.
Text(text = "Hello", letterSpacing = 2.sp)
7. μ΅λ μ€ μ μ ν
maxLinesλ₯Ό μ΄μ©ν΄ ν
μ€νΈκ° λͺ μ€κΉμ§ νμλ μ§ μ νν μ μμ΄μ.
Text(text = "Hello\nHello\nHello", maxLines = 2)
8. ν μ€νΈ μ₯μ
λ°μ€
Text(text = "Hello", textDecoration = TextDecoration.Underline)
μ·¨μμ
Text(text = "Hello", textDecoration = TextDecoration.LineThrough)
λ°μ€ + μ·¨μμ
Text(
text = "Hello",
textDecoration = TextDecoration.combine(
listOf(TextDecoration.Underline, TextDecoration.LineThrough)
)
)
μ₯μ μμ
Text(text = "Hello", textDecoration = TextDecoration.None)
9. ν μ€νΈ μ λ ¬
textAlign μμ±μΌλ‘ ν
μ€νΈμ μ λ ¬ λ°©μμ μ€μ ν μ μμ΄μ.
Text(modifier = Modifier.size(300.dp), text = "Hello", textAlign = TextAlign.Center)
width: κ°λ‘ ν¬κΈ°height: μΈλ‘ ν¬κΈ°
β¨ μΆκ° ν
fontFamilyλ₯Ό 컀μ€ν°λ§μ΄μ§νλ©΄ κ°μ± μλ μ€νμΌλ κ°λ₯ν΄μ!- μΈλΆ λΌμ΄λΈλ¬λ¦¬λ₯Ό ν΅ν΄ λ€μν κΈκΌ΄μ μΆκ°ν΄λ³΄μΈμ.
'Android' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
| κ΅°λμμ μλλ‘μ΄λ κ°λ°νκΈ° (0) | 2025.05.21 |
|---|---|
| Android Okhttp Logging Multipart 무μνκΈ° (0) | 2022.09.30 |
| Android BindingAdapter (0) | 2022.05.10 |
| Android DataBinding (0) | 2022.05.02 |
| Android dpμspμ μ°¨μ΄ (0) | 2022.04.29 |