Example #1
0
 /// <summary>Shows only the specified child.</summary>
 /// <remarks>
 /// Shows only the specified child. The other displays Views exit the screen,
 /// optionally with the with the
 /// <see cref="getOutAnimation()">out animation</see>
 /// and
 /// the specified child enters the screen, optionally with the
 /// <see cref="getInAnimation()">in animation</see>
 /// .
 /// </remarks>
 /// <param name="childIndex">The index of the child to be shown.</param>
 /// <param name="animate">
 /// Whether or not to use the in and out animations, defaults
 /// to true.
 /// </param>
 internal virtual void showOnly(int childIndex, bool animate_1)
 {
     int count = getChildCount();
     {
         for (int i = 0; i < count; i++)
         {
             android.view.View child = getChildAt(i);
             if (i == childIndex)
             {
                 if (animate_1 && mInAnimation != null)
                 {
                     child.startAnimation(mInAnimation);
                 }
                 child.setVisibility(android.view.View.VISIBLE);
                 mFirstTime = false;
             }
             else
             {
                 if (animate_1 && mOutAnimation != null && child.getVisibility() == android.view.View
                     .VISIBLE)
                 {
                     child.startAnimation(mOutAnimation);
                 }
                 else
                 {
                     if (child.getAnimation() == mInAnimation)
                     {
                         child.clearAnimation();
                     }
                 }
                 child.setVisibility(android.view.View.GONE);
             }
         }
     }
 }