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