Merge pull request #4784 from bd0n4lds/Dont-Use-Float-Type-For-Loop-Indices

Change loop index from float to int
This commit is contained in:
Stypox 2020-11-09 13:04:17 +01:00 committed by GitHub
commit 60dc9d27bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,8 +83,8 @@ public class ProgressDrawable extends Drawable {
// render marquee
width += size * 2;
Path marquee = new Path();
for (float i = -size; i < width; i += size) {
marquee.addPath(mMarqueeLine, i + mMarqueeProgress, 0);
for (int i = -size; i < width; i += size) {
marquee.addPath(mMarqueeLine, ((float)i + mMarqueeProgress), 0);
}
marquee.close();