Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
どのような状況で、Runnable を View クラスのインスタンス メソッド post() に渡すと、期待どおりに動作せず、Runnable を実行しませんか?
Runnableがキューの先頭に来る前にアクティビティが破棄されると、Runnableが実行されない可能性があります。
Runnable
プロセスが終了すると、 はRunnable単に存在しなくなります。
をキャンセルするRunnableと実行されません。
Runnableがキューの先頭に来る前にメイン アプリケーション スレッドをRunnable拘束すると、 は実行されず、最終的に ANR でクラッシュします。