kazinaが作ってるWebサービスやソフトについての情報、プログラミングのメモなどをたまに。あとはAGAT18Kなどカメラやシルバーアクセ作りについて、映画についてなどなど駄文です。 時間のかかる処理、例えばネットから何かをダウンロードするアプリを作る場合、「通信中」「ダウンロード中」などのダイアログを表示し、キャンセル可能な状態にした上で、別スレッドを起動して実際の通信処理を行うということがよくあります。 Androidなら、メインのActivityから時間のかかる処理を行うThreadを生成し、そのrun()の最後に、メインのActivityへ終了を通知、Activityはダイアログを閉じる、といった流れになるかと思いますが、androidでこのまま実装してしまうと「Only the original thread that create a view hierarchy can t