Commit 1f95502e authored by Aayush Gupta's avatar Aayush Gupta
Browse files

updates: UpdatesFragment: Switch to PorterDuffColorFilter for setting color filter

Current method has been deprecated

References:
- [1]: https://developer.android.com/reference/android/graphics/drawable/Drawable#setColorFilter(int,%20android.graphics.PorterDuff.Mode)0

Signed-off-by: Aayush Gupta's avatarAayush Gupta <theimpulson@e.email>
parent d29dfb08
......@@ -18,6 +18,8 @@
package foundation.e.apps.updates
import android.graphics.Color
import android.graphics.PorterDuff
import android.graphics.PorterDuffColorFilter
import android.os.Bundle
import android.os.Handler
import android.view.LayoutInflater
......@@ -67,10 +69,10 @@ class UpdatesFragment() : Fragment() {
updateAll.setTextColor(accentColorOS)
val splashContainer = view.findViewById<LinearLayout>(R.id.splash_container)
val progressBar = view.findViewById<ProgressBar>(R.id.progress_bar)
progressBar.getIndeterminateDrawable().setColorFilter(accentColorOS, android.graphics.PorterDuff.Mode.MULTIPLY);
progressBar.indeterminateDrawable.colorFilter = PorterDuffColorFilter(accentColorOS, PorterDuff.Mode.MULTIPLY)
val reloadProgressBar = view.findViewById<ProgressBar>(R.id.progress_bar2)
//progressBar.setProgressTintList(ColorStateList.valueOf(accentColorOS));
reloadProgressBar.getIndeterminateDrawable().setColorFilter(accentColorOS, android.graphics.PorterDuff.Mode.MULTIPLY);
reloadProgressBar.indeterminateDrawable.colorFilter = PorterDuffColorFilter(accentColorOS, PorterDuff.Mode.MULTIPLY)
val errorContainer = view.findViewById<LinearLayout>(R.id.error_container)
val errorDescription = view.findViewById<TextView>(R.id.error_description)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment