LinearLayoutManager用于回收站视图和Scroll Listener ..?

时间:2016-12-27 17:45:59

标签: c# android xamarin android-recyclerview

我的recyclerview标签中有fragment,1声明变量

mLayoutManager = new LinearLayoutManager (Context)

OnCreate方法中,在Recyclerview我制作

scrollListener var = new scroll (mLayoutManager);

这两个都需要mLinearlayoutmanagers是相同的,如果有错误.. 这种情况

mLayoutManager = new LinearLayoutManager(Context);     
var scrollListener = new scroll(mLayoutManager);
// This successful working properly
mRecyclerView.SetLayoutManager(mLayoutManager); 
// This successful but if in the tab on the move will occur error but I found the solution
mRecyclerView.AddOnScrollListener(scrollListener);

成功但......:

//mLayoutManager = new LinearLayoutManager(Context);       
var scrollListener = new scroll(mLayoutManager); // not working properly
mRecyclerView.SetLayoutManager(new LinearLayoutManager(Context)); 
// this successful  if in the tab on the move will not be an error.
mRecyclerView.AddOnScrollListener(scrollListener);

任何人都可以帮助我...... ??

0 个答案:

没有答案