Example usage for android.widget ViewAnimator getCurrentView

List of usage examples for android.widget ViewAnimator getCurrentView

Introduction

In this page you can find the example usage for android.widget ViewAnimator getCurrentView.

Prototype

public View getCurrentView() 

Source Link

Document

Returns the View corresponding to the currently displayed child.

Usage

From source file:org.libreoffice.impressremote.fragment.ComputersFragment.java

private void setCurrentView(int aViewId) {
    ViewAnimator aViewAnimator = (ViewAnimator) getView().findViewById(R.id.view_animator);
    View aView = getView().findViewById(aViewId);

    if (aViewId == aViewAnimator.getCurrentView().getId()) {
        return;/*from  w  w w. j  av  a2  s  .  co m*/
    }

    aViewAnimator.setDisplayedChild(aViewAnimator.indexOfChild(aView));
}