final Handler handler = new Handler()
{
public void handleMessage(Message msg)
{
if (msg.what == 0x123)
{
invalidate();
}
}
};
final Timer timer = new Timer();
timer.schedule(new TimerTask()
{
@Override
public void run()
{
// 发送消息,通知系统重绘组件
handler.sendEmptyMessage(0x123);
}
}, 0, 100);