本文整理了Java中android.support.v4.widget.NestedScrollView.getHeight()
方法的一些代码示例,展示了NestedScrollView.getHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NestedScrollView.getHeight()
方法的具体详情如下:
包路径:android.support.v4.widget.NestedScrollView
类名称:NestedScrollView
方法名:getHeight
暂无
代码示例来源:origin: iMeiji/Toutiao
scrollView.getViewTreeObserver().addOnScrollChangedListener(() -> {
View view1 = scrollView.getChildAt(scrollView.getChildCount() - 1);
int diff = (view1.getBottom() - (scrollView.getHeight() + scrollView.getScrollY()));
if (diff == 0) {
canLoadMore = false;
代码示例来源:origin: nuptboyzhb/SuperSwipeRefreshLayout
View view = (View) nestedScrollView.getChildAt(nestedScrollView.getChildCount() - 1);
if (view != null) {
int diff = (view.getBottom() - (nestedScrollView.getHeight() + nestedScrollView.getScrollY()));
if (diff == 0) {
return true;
代码示例来源:origin: dom4j1/Red
@Override
public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
View view = mScrollView.getChildAt(mScrollView.getChildCount() - 1);
int d = view.getBottom();
d -= (mScrollView.getHeight() + mScrollView.getScrollY());
if (d == 0) {
showSnakerbar();
}
}
}
代码示例来源:origin: zhangke3016/TranslationCompat
@Override
public void onTransitionEnd(Animator animator) {
getSupportActionBar().show();
mFloatingActionButton.animate().setDuration(300).scaleX(1).scaleY(1);
ObjectAnimator mAnimator = ObjectAnimator.ofFloat(nsv,"translationY",nsv.getHeight(),0);
// Animator mAnimator = ViewAnimationCompatUtils.createCircularReveal( nsv, 0, 0, nsv.getWidth() / 2, nsv.getHeight());
mAnimator.setDuration(300);
mAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
mAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation);
}
@Override
public void onAnimationStart(Animator animation) {
nsv.setVisibility(View.VISIBLE);
super.onAnimationStart(animation);
}
});
mAnimator.start();
}
代码示例来源:origin: rubensousa/Transitions
@Override
public void onGlobalLayout() {
if (nestedScrollView.getHeight() != 0) {
appbar.setExpanded(true);
appbar.addOnOffsetChangedListener(ToolbarActivity.this);
nestedScrollView.getViewTreeObserver()
.removeOnGlobalLayoutListener(this);
nestedScrollView.animate().setStartDelay(400).alpha(1f);
nestedScrollView.setTranslationY(nestedScrollView.getHeight() / 3);
nestedScrollView.animate().setStartDelay(400).translationY(0)
.setInterpolator(new AccelerateDecelerateInterpolator());
}
}
});
代码示例来源:origin: shaopx/CoordinatorLayoutExample
private boolean reachBottom(View target) {
if (target instanceof NestedScrollView) {
NestedScrollView nestedScrollView = (NestedScrollView) target;
int scrollY = nestedScrollView.getScrollY();
View onlyChild = nestedScrollView.getChildAt(0);
if (onlyChild.getHeight() <= scrollY + nestedScrollView.getHeight()) {
return true;
}
} else if (target instanceof RecyclerView) {
RecyclerView recyclerView = (RecyclerView) target;
if (recyclerView.computeVerticalScrollExtent() + recyclerView.computeVerticalScrollOffset()
>= recyclerView.computeVerticalScrollRange()) {
return true;
}
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!