本文整理匯總了Java中android.support.design.widget.AppBarLayout.getMeasuredHeight方法的典型用法代碼示例。如果您正苦於以下問題:Java AppBarLayout.getMeasuredHeight方法的具體用法?Java AppBarLayout.getMeasuredHeight怎麽用?Java AppBarLayout.getMeasuredHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.design.widget.AppBarLayout
的用法示例。
在下文中一共展示了AppBarLayout.getMeasuredHeight方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onStopNestedScroll
import android.support.design.widget.AppBarLayout; //導入方法依賴的package包/類
@Override
public void onStopNestedScroll(CoordinatorLayout coordinatorLayout, AppBarLayout abl, View target, int type) {
bindChild(abl);
float currentTop = abl.getTop();
mAppBarLayout.mAppLayoutHeight = abl.getMeasuredHeight();
if (currentTop > mOriginTop) {
mAppBarLayout.scrollAndShowAppBar();
} else if (currentTop < mOriginTop) {
mAppBarLayout.scrollAndHideAppBar();
}
if (mAppBarLayout.mListener != null) {
mAppBarLayout.mListener.onStopNestedScrolling();
}
super.onStopNestedScroll(coordinatorLayout, abl, target, type);
}
示例2: getMinOffset
import android.support.design.widget.AppBarLayout; //導入方法依賴的package包/類
protected int getMinOffset(AppBarLayout layout) {
int minOffset = layout.getMeasuredHeight();
if (mScrollFlag != null) {
if (mScrollFlag.isFlagScrollEnabled()) {
minOffset = layout.getMeasuredHeight() - getMinHeight(layout, false);
}
}
if (ViewCompat.getFitsSystemWindows(layout)) {
if (mStatusBarSize == 0) {
mStatusBarSize = Utils.getStatusBarSize(layout.getContext());
}
minOffset -= mStatusBarSize;
}
return -Math.max(minOffset, 0);
}