/** * *********************************** * * <p>ActionsCode(author:hexibin, change_code) */ @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); // ActionsCode(hexibin, bugfix BUG00297099) if (mIsFixedTitleBar && mShowing) { int margin = getMeasuredHeight() - calculateEmbeddedHeight(); mBaseUi.setContentViewMarginTop(-margin); } else { mBaseUi.setContentViewMarginTop(0); } // ActionsCode(hexibin, bugfix BUG00297099) if (!mShowing) { setMeasuredDimension(0, 0); } }
private void setFixedTitleBar() { // If getParent() returns null, we are initializing ViewGroup parent = (ViewGroup) getParent(); if (mIsFixedTitleBar && parent != null) return; mIsFixedTitleBar = true; setSkipTitleBarAnimations(true); show(); setSkipTitleBarAnimations(false); if (parent != null) { parent.removeView(this); } if (mIsFixedTitleBar) { mBaseUi.addFixedTitleBar(this); } else { mContentView.addView(this, makeLayoutParams()); mBaseUi.setContentViewMarginTop(0); } }