Fix animations

This commit is contained in:
Hemanth S 2020-12-03 20:31:27 +05:30
parent 54dc315845
commit 9fce62b9c5
21 changed files with 120 additions and 68 deletions

View file

@ -27,7 +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
import com.google.android.material.progressindicator.CircularProgressIndicator
object ViewUtil {
@ -77,9 +77,9 @@ object ViewUtil {
)
}
fun setProgressDrawable(progressIndicator: ProgressIndicator, newColor: Int) {
progressIndicator.indicatorColors = intArrayOf(newColor)
progressIndicator.trackColor = ColorUtil.withAlpha(newColor, 0.2f)
fun setProgressDrawable(indicator: CircularProgressIndicator, newColor: Int) {
indicator.setIndicatorColor(newColor)
indicator.trackColor = ColorUtil.withAlpha(newColor, 0.2f)
}
fun hitTest(v: View, x: Int, y: Int): Boolean {