Setvisibility(view.gone) Doesn't Disappear A View
In my activity, I have a start button, and when that's clicked it should fade out and finally disappear by setVisibility(View.GONE) The problem is setting visibility to GONE doesn'
Solution 1:
Because your fillAfter
is true, the animation sets the properties after your onAnimationEnd
is called. You can either change fillAfter
to false, or do it like this:
@Override
public void onAnimationEnd(Animation animation) {
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
startButtonArea.setVisibility(View.GONE);
Log.d("Animation ended","startButtonArea SHOULD BE GONE BUT IT ISN'T");
}
}, 0);
}
Post a Comment for "Setvisibility(view.gone) Doesn't Disappear A View"