I need to make a certain idea in order to appear / disappear gradually, step by step, and not suddenly. If I use MyView.setvisibility(View.GONE) or MyView.setvisibility(View.VISIBLE) , everything happens all of a sudden. Any idea how to do this?
Thanks in advance.
Here is my code:
animFlipInNext = AnimationUtils.loadAnimation(this, R.anim.push_left_in); animFlipInNext.setDuration(2000); animFlipInNext .setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { System.out.println("AnimStart- LeftIn" + " Will be displayed " + vf.getDisplayedChild()); if (vf.getCurrentView().equals(rr)) { System.out.println("begin layout for video"); rr.addView(myVideoView); myVideoView.setAnimation(AnimationUtils.loadAnimation(context, R.anim.fade_in)); } } @Override public void onAnimationRepeat(Animation animation) { System.out.println("AnimRepeat-LeftIn"); } @Override public void onAnimationEnd(Animation animation) { System.out.println("Anim end " + vf.getDisplayedChild()); if (vf.getCurrentView().equals(rr)) { System.out.println("layout for videoView"); rr.removeAllViews(); vf.stopFlipping(); myVideoView.start(); } } });
I have an animation for ViewFlipper. When the ViewFlipper contains rr RelativeLayout , I add a video to it. I try to make the video visible when it makes the switch to rr , but it did not work.
source share