public void changeViewPosition(View child,int newIndex){
  int currentIndex=indexOfChild(child);
  if (child != null && child.getParent() == this && currentIndex != newIndex) {
    mChangePositionInProgress=true;
    removeView(child);
    addView(child,newIndex);
    mChangePositionInProgress=false;
    if (mIsExpanded && mAnimationsEnabled && child.getVisibility() != View.GONE) {
      mChildrenChangingPositions.add(child);
      mNeedsAnimation=true;
    }
  }
}

public void changeViewPosition ( View child , int newIndex ) { int currentIndex = indexOfChild ( child ) ; if ( child != null && child . getParent ( ) == this && currentIndex != newIndex ) { mChangePositionInProgress = true ; removeView ( child ) ; addView ( child , newIndex ) ; mChangePositionInProgress = false ; if ( mIsExpanded && mAnimationsEnabled && child . getVisibility ( ) != View . GONE ) { mChildrenChangingPositions . add ( child ) ; mNeedsAnimation = true ; } } }
change the position of child to a new location
