0
我需要在RelativeLayout中進行時間控制,也就是說「此時從此活動開始,我希望應用此方法」。我嘗試在SurfaceView中使用:RelativeLayout中的時間計數
long time;
time = System.currentTimeMillis();
...
public static long getCurrentTimeFromStart() {
long current = System.currentTimeMillis();
return current-time;
}
...
if(getCurrentTimeFromStart() > timeChoosen){
method();}
但是這在RelativeLayout中不起作用。所以我問你是否有另一種方法需要時間控制。
在此先感謝!