mirror of
https://github.com/ev-map/EVMap.git
synced 2026-04-23 07:36:59 -04:00
@@ -401,4 +401,13 @@ fun loadImage(view: ImageView, url: String?) {
|
||||
@BindingAdapter("tooltipTextCompat")
|
||||
fun setTooltipTextCompat(view: View, text: String) {
|
||||
TooltipCompat.setTooltipText(view, text)
|
||||
}
|
||||
|
||||
@BindingAdapter("tintNullable")
|
||||
fun setImageTint(view: ImageView, @ColorInt tint: Int?) {
|
||||
if (tint != null) {
|
||||
view.imageTintList = ColorStateList.valueOf(tint)
|
||||
} else {
|
||||
view.imageTintList = null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user