1
我在count fragment
中添加runnable
,如下面的代碼。如何在另一個calss中調用Runnable?
public static Runnable getTime = new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
Long spentTime = System.currentTimeMillis() - startTime;
Long minius = (spentTime/1000)/60;
Long seconds = (spentTime/1000) % 60;
RecordTime.setText(record_time_text + minius + ":" + seconds);
mHandler.postDelayed(this, 1000);
}
};
而且我要調用其他class
的runnable
但它不能被count.getTime
打電話runnable
。
如何在另一個中調用Runnable
?
你試過'count.getTime.run()'嗎? – Henry