Replaced material progress with Materia Design components

This commit is contained in:
Hemanth S 2020-07-15 01:17:41 +05:30
parent 06a52b1323
commit 0e81e3cb48
7 changed files with 26 additions and 143 deletions

View file

@ -27,6 +27,7 @@ import androidx.core.view.ViewCompat
import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import com.google.android.material.progressindicator.ProgressIndicator
object ViewUtil {
@ -76,6 +77,10 @@ object ViewUtil {
)
}
fun setProgressDrawable(progressIndicator: ProgressIndicator, newColor: Int) {
progressIndicator.progressTintList = ColorStateList.valueOf(newColor)
}
fun hitTest(v: View, x: Int, y: Int): Boolean {
val tx = (ViewCompat.getTranslationX(v) + 0.5f).toInt()
val ty = (ViewCompat.getTranslationY(v) + 0.5f).toInt()