public void updateView(View child,View dependency){
  float percent=0;
  float start=0;
  float current=0;
  float end=UNSPECIFIED_INT;
switch (mDependType) {
case DEPEND_TYPE_WIDTH:
    start=mDependStartWidth;
  current=dependency.getWidth();
end=mDependTargetWidth;
break;
case DEPEND_TYPE_HEIGHT:
start=mDependStartHeight;
current=dependency.getHeight();
end=mDependTargetHeight;
break;
case DEPEND_TYPE_X:
start=mDependStartX;
current=dependency.getX();
end=mDependTargetX;
break;
case DEPEND_TYPE_Y:
start=mDependStartY;
current=dependency.getY();
end=mDependTargetY;
break;
}
if (end != UNSPECIFIED_INT) {
percent=Math.abs(current - start) / Math.abs(end - start);
}
updateViewWithPercent(child,percent > 1 ? 1 : percent);
}

public void updateView ( View child , View dependency ) { float percent = 0 ; float start = 0 ; float current = 0 ; float end = UNSPECIFIED_INT ; switch ( mDependType ) { case DEPEND_TYPE_WIDTH : start = mDependStartWidth ; current = dependency . getWidth ( ) ; end = mDependTargetWidth ; break ; case DEPEND_TYPE_HEIGHT : start = mDependStartHeight ; current = dependency . getHeight ( ) ; end = mDependTargetHeight ; break ; case DEPEND_TYPE_X : start = mDependStartX ; current = dependency . getX ( ) ; end = mDependTargetX ; break ; case DEPEND_TYPE_Y : start = mDependStartY ; current = dependency . getY ( ) ; end = mDependTargetY ; break ; } if ( end != UNSPECIFIED_INT ) { percent = Math . abs ( current - start ) / Math . abs ( end - start ) ; } updateViewWithPercent ( child , percent > 1 ? 1 : percent ) ; }
update the child view from the dependency states
