Skip to content

Commit

Permalink
chore(android): updated ActivityIndicator to use non-deprecated color…
Browse files Browse the repository at this point in the history
… filter
  • Loading branch information
jquick-axway authored and ewanharris committed Jun 10, 2021
1 parent 5b7c0e2 commit fdfd7c5
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.view.Gravity;
import android.view.View;
import android.widget.LinearLayout;
Expand Down Expand Up @@ -163,10 +165,11 @@ private void updateIndicator()
// Update indicator's color.
if (this.proxy.hasPropertyAndNotNull(TiC.PROPERTY_INDICATOR_COLOR)) {
int color = TiConvert.toColor(TiConvert.toString(this.proxy.getProperty(TiC.PROPERTY_INDICATOR_COLOR)));
this.progress.getIndeterminateDrawable().setColorFilter(color, android.graphics.PorterDuff.Mode.SRC_IN);
this.progress.getIndeterminateDrawable().setColorFilter(
new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN));
} else if ((styleId == DARK) || (styleId == BIG_DARK)) {
int color = Color.DKGRAY;
this.progress.getIndeterminateDrawable().setColorFilter(color, android.graphics.PorterDuff.Mode.SRC_IN);
this.progress.getIndeterminateDrawable().setColorFilter(
new PorterDuffColorFilter(Color.DKGRAY, PorterDuff.Mode.SRC_IN));
} else {
this.progress.getIndeterminateDrawable().clearColorFilter();
}
Expand Down

0 comments on commit fdfd7c5

Please sign in to comment.