Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Behavior
- CollapsingToolbarLayout
- kotlin
- AppBarLayout
- 코틀린
- LiveData
- View
- sqlite
- onMeasure
- lifecycle
- Algorithm
- room
- DataBinding
- 알림
- Coroutine
- ViewModel
- notification
- 알고리즘
- HTTP
- CustomView
- Android
- hilt
- BOJ
- 안드로이드
- CoordinatorLayout
- 백준
- recyclerview
- Navigation
- activity
- onLayout
Archives
- Today
- Total
목록BindingAdapter (1)
개발일지

BindingAdapter Databinding을 사용하다 보면 기본적으로 제공하는 수식으로 표현 못하는 경우가 생긴다. (Glide를 사용한 ImageView 업데이트) BindingAdapter를 정의하면 해결할 수 있다. BindingAdapter object BindingAdapter { @JvmStatic @BindingAdapter(value = ["imageUrl", "error"], requireAll = false) fun loadImage(view: ImageView, url: String?, error: Drawable?) { Glide.with(view).load(url).error(error).into(view) } } @JvmStatic : Java에서도 호환을 도와주는 코드(J..
Android (안드로이드)/Databinding
2021. 1. 21. 03:15