ViewAnimator showPrevious - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ViewAnimator showPrevious method.

This code example shows how to use the following methods:setInAnimation, setOutAnimation, showPrevious
This code example shows how to use the following methods:getCurrentView, setInAnimation, setOutAnimation, showNext, showPrevious
This code example shows how to use the following methods:getChildAt, getDisplayedChild, setInAnimation, setOutAnimation, showPrevious
    /** 
     * 前月を表示する 
     * @param direction モーションの方向をセット(DIRECTION_VERTICAL|DIRECTION_HORIZONTAL) 
     */ 
    private void showPreviousMonth(int direction) {
        int index = this.viewFlipper.getDisplayedChild() == 0 ? 1 : 0;
        MonthlyCalendarView calendarView = 
            (MonthlyCalendarView)this.viewFlipper.getChildAt(index);
        if ( calendarView != null ) {
            calendarView.setCalendar(this.calendar);
            this.setHeader(this.calendar.get(java.util.Calendar.YEAR)
                    , calendar.get(java.util.Calendar.MONTH));
            if ( direction == DIRECTION_VERTICAL ) {
                this.viewFlipper.setInAnimation(inFromTop);
                this.viewFlipper.setOutAnimation(outToBottom);
            } else { 
                this.viewFlipper.setInAnimation(inFromLeft);
                this.viewFlipper.setOutAnimation(outToRight);
            } 
            this.viewFlipper.showPrevious();

6
CodeRank
This code example shows how to use the following methods:setInAnimation, setOutAnimation, showPrevious
This code example shows how to use the following methods:setInAnimation, setOutAnimation, showNext, showPrevious
	case MotionEvent.ACTION_UP:
		 
		float currentX=event.getX();
		 
		if(currentX>oldTouchValue){
			page.setInAnimation(AnimationHelper.inFromLeftAnimation());
			page.setOutAnimation(AnimationHelper.outToRightAnimation());
			page.showNext();
			 
		} 
		 
		if(currentX<oldTouchValue){
			page.setInAnimation(AnimationHelper.inFromRightAnimation());
			page.setOutAnimation(AnimationHelper.outToLeftAnimation());
			page.showPrevious();}
		 
		break; 
	} 
	return false; 
} 
6
CodeRank
This code example shows how to use the following methods:setInAnimation, setOutAnimation, showPrevious
            float dx = Math.abs(velocityX); 
            float dy = Math.abs(velocityY); 
 
            if (dx > dy && dx > 150) { 
                if (e1.getX() < e2.getX()) { 
                    viewFlipper.setInAnimation(inFromLeft); 
                    viewFlipper.setOutAnimation(outToRight); 
                    viewFlipper.showPrevious(); 
                    setDataLogic.leftToRightLogic(); 
                } else { 
                    viewFlipper.setInAnimation(inFromRight); 
                    viewFlipper.setOutAnimation(outToLeft); 
                    viewFlipper.showNext(); 
                    setDataLogic.rightToLeftLogic(); 
                } 
                setDataLogic.setDataLogic(); 
                Log.d("BBT", "OnGestureListener.onFling"); 
                return true; 
            } 
 
6
CodeRank
This code example shows how to use the following methods:setInAnimation, setOutAnimation, showPrevious
This code example shows how to use the following methods:setInAnimation, setOutAnimation, showNext, showPrevious
            { 
                //if(this.searchOk==false) return false; 
                float currentX = touchevent.getX();
                if (oldTouchValue < currentX)
                { 
                   vf.setInAnimation(inFromLeftAnimation());
                   vf.setOutAnimation(outToRightAnimation());
                    vf.showNext();
                } 
                if (oldTouchValue > currentX)
                { 
                    vf.setInAnimation(inFromRightAnimation());
                    vf.setOutAnimation(outToLeftAnimation());
                    vf.showPrevious();
                } 
            break; 
            } 
        } 
        return false; 
    } 
6
CodeRank
This code example shows how to use the following methods:setInAnimation, setOutAnimation, showNext, showPrevious
                float currentX = arg1.getX();            
 
                // going backwards: pushing stuff to the right 
                if (downXValue < currentX) {
                	// Get a reference to the ViewFlipper 
                	viewFlipper.setInAnimation(myFlipperAnimation.inFromRightAnimation());
                	viewFlipper.setOutAnimation(myFlipperAnimation.outToLeftAnimation());
                	viewFlipper.showNext();
                	/* 
                	Intent myIntent = new Intent(v.getContext(), VolsActivity.class); 
                    startActivityForResult(myIntent, 0); 
                    */ 
                } 
 
                // going forwards: pushing stuff to the left 
                if (downXValue > currentX) {
                	viewFlipper.setInAnimation(myFlipperAnimation.inFromLeftAnimation());
                	viewFlipper.setOutAnimation(myFlipperAnimation.outToRightAnimation());
                	viewFlipper.showPrevious();  
                	/* 

6
CodeRank
This code example shows how to use the following methods:setInAnimation, setOutAnimation, showPrevious
        if( velocity_x < 0 ) { 
            this.viewFlipper.setInAnimation(rightInAnimation); 
            this.viewFlipper.setOutAnimation(leftOutAnimation); 
            this.viewFlipper.showNext(); 
        } else { 
            this.viewFlipper.setInAnimation(leftInAnimation); 
            this.viewFlipper.setOutAnimation(rightOutAnimation); 
            this.viewFlipper.showPrevious(); 
        } 
    } 
 
    // not support. 
    public void notifyClick(Object event) {} 
    public void notifyLongClick(Object event) {} 
    public void notifyLongClickForDailyInfo(Object event) {} 
 
    /** 
     * @brief Graph Index Enum. 
     */ 
    private enum GraphIndex { 
5
CodeRank

Related ViewAnimator showPrevious Questions & Answers:

showPrevious Method Overview
Manually shows the previous child.
See Code Examples for other Android ViewAnimator Methods: