Android Recyclerview, want to know how it determines the data list for listing -
so trying figure out how use recyclerview listing items. unlike listview has adapter passes list constructor internal working, recyclerview not seem have one, example, in class extending recyclerview.adapter provide contructor set list declared.
public customadapter(data[] mydataset) { this.mdataset = mydataset; }
but how recyclerview.adapter know use? example, since constructor provided us, possible make contructor put 2 parameters 2 different data type lists/arrays. how adapter know list use??
add: or use according how use lists on onbingviewholder method? if so, how position parameter work?
take @ this post. has simple example pretty overview/explanation of recyclerview , how works.
Comments
Post a Comment