public virtual void closeMode() { if (mAnimationMode == ANIMATE_OUT) { // Called again during close; just finish what we were doing. return; } if (mClose == null) { killMode(); return; } finishAnimation(); mAnimationMode = ANIMATE_OUT; mCurrentAnimation = makeOutAnimation(); mCurrentAnimation.start(); }
protected internal override void onLayout(bool changed, int l, int t, int r, int b) { int x = getPaddingLeft(); int y = getPaddingTop(); int contentHeight = b - t - getPaddingTop() - getPaddingBottom(); if (mClose != null && mClose.getVisibility() != GONE) { android.view.ViewGroup.MarginLayoutParams lp = (android.view.ViewGroup.MarginLayoutParams )mClose.getLayoutParams(); x += lp.leftMargin; x += positionChild(mClose, x, y, contentHeight); x += lp.rightMargin; if (mAnimateInOnLayout) { mAnimationMode = ANIMATE_IN; mCurrentAnimation = makeInAnimation(); mCurrentAnimation.start(); mAnimateInOnLayout = false; } } if (mTitleLayout != null && mCustomView == null) { x += positionChild(mTitleLayout, x, y, contentHeight); } if (mCustomView != null) { x += positionChild(mCustomView, x, y, contentHeight); } x = r - l - getPaddingRight(); if (mMenuView != null) { x -= positionChildInverse(mMenuView, x, y, contentHeight); } }