Android ViewFlipper - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android ViewFlipper class.

This code example shows how to use the following methods: setInAnimation, setOutAnimation, showPrevious
This code example shows how to use the following methods: showNext
     
    flipper=(ViewFlipper)findViewById(R.id.details);
  } 
   
  public void flip(View v) {
    flipper.showNext();
  } 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: setLayoutParams, addView, setDisplayedChild
		// Flipper layout 
		LayoutParams flipperParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
		flipperParams.gravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL;
		 
		iconFlipper = new SafeViewFlipper(getContext());
		iconFlipper.setLayoutParams(flipperParams);
		iconFlipper.addView(imageLayout, 0);
		iconFlipper.addView(progressLayout, 1);
		iconFlipper.setDisplayedChild(0);	
 
		 
/****************************************** 
 * Assembly 
 ******************************************/		 
		addView(iconFlipper);
		addView(textLayout);
	} 
 
	public void setDisplayUtils(DisplayUtils deviceUtils) {
		this.displayUtils = deviceUtils;
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getChildCount, getDisplayedChild
	protected boolean isFirstDisplayed() { 
		return (flipper.getDisplayedChild() == 0);
	} 
 
	protected boolean isLastDisplayed() { 
		return (flipper.getDisplayedChild() == flipper.getChildCount() - 1);
	} 
 
	protected void updateButtons() { 
		boolean eula = (flipper.getDisplayedChild() == 0);
 
		next.setText(eula ? getString(R.string.wizard_agree) : getString(R.string.wizard_next));
		prev.setText(eula ? getString(R.string.delete_neg) : getString(R.string.wizard_back));
	} 
} 
Full Snippet Info
6
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android ViewFlipper Questions & Answers:

See Code Examples for Android ViewFlipper Methods: