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中不起作用。所以我问你是否有另一种方法需要时间控制。
在此先感谢!