Background AutoColor

color1 = 0xffffffff;

anim = ObjectAnimator.ofInt(linear1, "backgroundColor", color1);
anim.setEvaluator(new ArgbEvaluator());
anim.setDuration(1000);
new Thread() {
public void run() {
while(true) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
runOnUiThread(new Runnable() {
public void run() {
red2 = (int)(java.lang.Math.random() * 128 + 127);
green2 = (int)(java.lang.Math.random() * 128 + 127);
blue2 = (int)(java.lang.Math.random() * 128 + 127);
color2 = 0xff << 24 | (red2 << 16) | (green2 << 8) | blue2;
anim.setIntValues(color1, color2);
anim.start();
color1 = color2;
}
});
}
}
}.start();
}
public int color1, color2, red1, red2, blue1, blue2, green1, green2;
ObjectAnimator anim;
{