0

I had recyclerview in my fragment tab, 1 declare variables

mLayoutManager = new LinearLayoutManager (Context)

in the OnCreate method, and in my Recyclerview i make

scrollListener var = new scroll (mLayoutManager);

which both require mLinearlayoutmanagers are the same and in case of error.. this case

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);

successful but .. :

//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);

any one can help me..??

H. Pauwelyn
  • 13,575
  • 26
  • 81
  • 144
Nur Amsyari
  • 23
  • 2
  • 10
  • A little confused about your real question? – Mike Ma Dec 28 '16 at 01:34
  • You've already asked this question in a different form. I left an answer there: http://stackoverflow.com/questions/41354809/how-to-get-linearlayoutmanager-from-recyclerview – SuavePirate Dec 28 '16 at 15:29

0 Answers0