Back to project page NavigationDrawerSI.
The source code is released under:
Apache License
If you think the Android project NavigationDrawerSI listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package mmbialas.pl.navigationdrawersi.ui.misc; /*ww w . j a v a2s. c om*/ import android.content.Context; import android.util.AttributeSet; import android.widget.ViewAnimator; public class BetterViewAnimator extends ViewAnimator { public BetterViewAnimator(Context context, AttributeSet attrs) { super(context, attrs); } public void setDisplayedChildId(int id) { if (getDisplayedChildId() == id) { return; } for (int i = 0, count = getChildCount(); i < count; i++) { if (getChildAt(i).getId() == id) { setDisplayedChild(i); return; } } throw new IllegalArgumentException("No view with ID " + id); } public int getDisplayedChildId() { return getChildAt(getDisplayedChild()).getId(); } }