プログラム用に簡単なアニメーションを作成したいと思います。目に見えないボタンが4つあり、プログラムが開始されると、それらのボタンが遅れて表示されるようになります。
ボタン 1 を表示 -> ボタン 2 -> など。
これを試してみましたが、プログラムを実行すると、すべてのボタンが同時に表示されます。
try {
((Button) findViewById(R.id.f1)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
((Button) findViewById(R.id.f2)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
((Button) findViewById(R.id.f3)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
((Button) findViewById(R.id.f4)).setVisibility(View.VISIBLE);
Thread.sleep(1200);
} catch (Exception e) {
}
誰でも私を助けることができますか?