Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Add delay to While loop for animation to complete
- if(viewFlipper.getDisplayedChild()!=0 || viewFlipper.getDisplayedChild()> 0 ){
- do
- {
- viewFlipper.setInAnimation(slideRightIn);
- viewFlipper.setOutAnimation(slideRightOut);
- viewFlipper.showPrevious();
- //Delay need here to allow animation to complete
- } while (viewFlipper.getDisplayedChild()!=0);
- }
- //System.out.println("New Flipper "+viewFlipper.getDisplayedChild());
- break;
- try {
- Thread.sleep(800);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- slideRightIn.setAnimationListener(new AnimationListener() {
- public void onAnimationStart(Animation animation) {
- }
- public void onAnimationRepeat(Animation animation) {
- }
- public void onAnimationEnd(Animation animation) {
- // will be called when your animation is complete
- }
- });
Add Comment
Please, Sign In to add comment