일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- nav_graph
- room
- 면접
- asLiveData()
- hilt
- imageview
- Safe Args
- android studio
- Android
- Gradle
- 취업
- Binding Adapter
- recyclerview
- fragment
- themes.xml
- 일렉트론
- Datastore
- 주석
- ViewModel
- Navigation Component
- Livedata
- 테마
- 안드로이드
- kotlin
- Jetpack Compose
- electron
- TypeConverter
- BottomNavigationView
- 개발자
- 스플래시
Archives
- Today
- Total
목록Data Binding (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