Open Ycocol opened 6 years ago
我也是这个问题
貌似是没有,我是直接加了ScrollVieww.
Try this
mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
// TODO Auto-generated method stub
//super.onScrollStateChanged(recyclerView, newState);
int firstPos = mLayoutManager.findFirstCompletelyVisibleItemPosition();
if (firstPos > 0) {
ptrFrameLayout.setEnabled(false);
} else {
ptrFrameLayout.setEnabled(true);
}
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
super.onScrolled(recyclerView, dx, dy);
}
});
是不是需要设置其他属性才可以滑动PrtFrameLayout?自己在PrtFrameLayout下加了子Scrollview,然后上拉顶部会被隐藏掉。