일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- imageview
- 테마
- room
- Jetpack Compose
- Android
- nav_graph
- 안드로이드
- Livedata
- Navigation Component
- 취업
- TypeConverter
- Gradle
- 일렉트론
- fragment
- asLiveData()
- 주석
- ViewModel
- kotlin
- 면접
- Binding Adapter
- Safe Args
- themes.xml
- 스플래시
- electron
- BottomNavigationView
- hilt
- Datastore
- recyclerview
- android studio
- 개발자
Archives
- Today
- Total
목록layout (1)
나만 보는 일기장
[Android] Binding Adapter 쓰는 법
Binding Adapter는 View(xml)에 직접 속성을 만들어 사용할 수 있게 해주는 기능입니다. class RecipesRowBinding { companion object { @JvmStatic @BindingAdapter("속성 이름") fun applyVeganColor(view: View, isSomething: Boolean) { if (isSomething) { when (view) { is TextView -> view.setTextColor( ContextCompat.getColor( view.context, R.color.green ) ) is ImageView -> view.setColorFilter( ContextCompat.getColor( view.context, R.co..
개발/Android
2021. 11. 3. 12:04