安卓中使textview隔一段时间变换颜色

tx1.setBackground(getResources().getDrawable(R.drawable.style3));
try {
Thread.sleep(1000);
}
catch (InterruptedException e) {
e.printStackTrace();
}
tx1.setBackground(getResources().getDrawable(R.drawable.style));
为什么这样写不会变化啊

要看你style里怎么写的,你直接给它附一个颜色值试试

<shape
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:shape="oval"




这是style3,style的颜色是白色的

你要贴出你的style3和style的完整代码