特定のイベントが発生したときにボタンをフェードアウトさせようとしていますが、ボタンへの変更は瞬時ではなく、実行されたボタンのすべての操作が完了するのを待ちます。表示する (できれば簡単な) 方法はありますか変更が発生したときのユーザーへの変更
コード:
featuredimage.setBackgroundDrawable(getResources().getDrawable(R.drawable.featuredimage_cc_movement1));
for (int alpha = 0; alpha < 255; alpha+=10) {
//Thread.sleep(1);
featuredimage.setAlpha(alpha);
featuredinfo.setAlpha(alpha);
}
featuredinfo.setText(Html.fromHtml("<center><big><b>FEATURED " + catagory + "</b></big></center><br>"
+ getFeatured().getMediumString()));
featuredimage.setBackgroundDrawable(getResources().getDrawable(R.drawable.featuredimage_gradient));
for (int alpha = 255; alpha > 0; alpha--) {
//Thread.sleep(1);
featuredimage.setAlpha(alpha);
featuredinfo.setAlpha(alpha);
}