处理程序 - PostDelayed 方法 "break" 代码的其余部分(块)?
Handler - PostDelayed method "break" the rest (block) of code?
如果代码在 Android 的 postdelayed 方法中,并且在它下面是更多代码,postdelayed 会锁定所有内容吗?
示例:
final Handler handler = new Handler ();
handler.postDelayed (new Runnable () {
@Override
public void run () {
// do something here after 1800millis
}
}, 1800);
// something to show on the screen here, this only after 1800millis also?
只有 postDelayed
内的代码才会被延迟。它不会阻止任何后续内容。
如果代码在 Android 的 postdelayed 方法中,并且在它下面是更多代码,postdelayed 会锁定所有内容吗?
示例:
final Handler handler = new Handler ();
handler.postDelayed (new Runnable () {
@Override
public void run () {
// do something here after 1800millis
}
}, 1800);
// something to show on the screen here, this only after 1800millis also?
只有 postDelayed
内的代码才会被延迟。它不会阻止任何后续内容。