草庐IT

canChildScrollUp

全部标签

Android SwipeRefreshLayout如果child不是ListView或ScrollView如何实现canChildScrollUp

嗨,我有一个SwipeRefreshLayout,它包含一个相对布局,其中包含一个ScrollView和另一个View,当我向下滚动列表时,有时不会向上滚动,而是运行onRefresh函数。除非View位于顶部,否则我如何防止它运行?我读过关于canChildScrollUp但没有找到正确实现它的方法。这是我的布局这是我实现类(class)的地方swipeLayout=(SwipeRefreshLayout)v.findViewById(R.id.swipe_container);swipeLayout.setColorSchemeColors(Color.parseColor("#e

Android SwipeRefreshLayout如果child不是ListView或ScrollView如何实现canChildScrollUp

嗨,我有一个SwipeRefreshLayout,它包含一个相对布局,其中包含一个ScrollView和另一个View,当我向下滚动列表时,有时不会向上滚动,而是运行onRefresh函数。除非View位于顶部,否则我如何防止它运行?我读过关于canChildScrollUp但没有找到正确实现它的方法。这是我的布局这是我实现类(class)的地方swipeLayout=(SwipeRefreshLayout)v.findViewById(R.id.swipe_container);swipeLayout.setColorSchemeColors(Color.parseColor("#e