Added back version checking (and version boxes) after transitioning homepage to MVVM

Fixed several errors caused along the way
This commit is contained in:
Viktor De Pasquale
2019-04-14 11:00:16 +02:00
parent bd00ae8ede
commit 9bb4dfad13
8 changed files with 105 additions and 25 deletions

View File

@@ -1,6 +1,7 @@
package com.topjohnwu.magisk.utils
import android.view.View
import androidx.annotation.ColorInt
import androidx.annotation.DrawableRes
import androidx.appcompat.widget.AppCompatImageView
import androidx.appcompat.widget.Toolbar
@@ -16,3 +17,8 @@ fun setOnNavigationClickedListener(view: Toolbar, listener: View.OnClickListener
fun setImageResource(view: AppCompatImageView, @DrawableRes resId: Int) {
view.setImageResource(resId)
}
@BindingAdapter("app:tint")
fun setTint(view: AppCompatImageView, @ColorInt tint: Int) {
view.setColorFilter(tint)
}