@Override protected void onMeasure(int widthMeasureSpec,int heightMeasureSpec){
  int measureHeight=measureHeight(heightMeasureSpec);
  if (mMaxParentHeight != 0 && Math.abs(measureHeight - mOldHeight) < mMaxNavBarHeight) {
    mMaxParentHeight+=(measureHeight - mOldHeight);
  }
 else   if (mMaxParentHeight == 0 || measureHeight > mMinLayoutHeight) {
    mMaxParentHeight=measureHeight;
  }
  heightList.add(measureHeight);
  int heightMode=MeasureSpec.getMode(heightMeasureSpec);
  int expandSpec=MeasureSpec.makeMeasureSpec(mMaxParentHeight,heightMode);
  super.onMeasure(widthMeasureSpec,expandSpec);
  mOldHeight=measureHeight;
}

@ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { int measureHeight = measureHeight ( heightMeasureSpec ) ; if ( mMaxParentHeight != 0 && Math . abs ( measureHeight - mOldHeight ) < mMaxNavBarHeight ) { mMaxParentHeight += ( measureHeight - mOldHeight ) ; } else if ( mMaxParentHeight == 0 || measureHeight > mMinLayoutHeight ) { mMaxParentHeight = measureHeight ; } heightList . add ( measureHeight ) ; int heightMode = MeasureSpec . getMode ( heightMeasureSpec ) ; int expandSpec = MeasureSpec . makeMeasureSpec ( mMaxParentHeight , heightMode ) ; super . onMeasure ( widthMeasureSpec , expandSpec ) ; mOldHeight = measureHeight ; }
when keyboard hide , three onmeasure will be called onmeasure measureheight = 1533 onmeasure measureheight = 725 onlayout top = 0 , bottom = 1533 onmeasure measureheight = 725 onlayout top = 0 , bottom = 725
