florent37 / Carpaccio

Data Mapping & Smarter Views framework for android
https://github.com/florent37/Carpaccio/wiki
Apache License 2.0
414 stars 70 forks source link

Edit recyclerview items #5

Closed kegita closed 9 years ago

kegita commented 9 years ago

Hello! How can access list mapped to Carpaccio and notifiydatasetchanged??? Thanks

florent37 commented 9 years ago

Hi, you can use carpaccio.getMappedList("user")if you used mapList("user") I'm doin the wiki, so don't hesitate to send me questions, if it's implemented I'll put the answer here, else I'll implement it

florent37 commented 9 years ago

if you want to notify dataset changed `carpaccio.getAdapter("user").notifyDataSetChanged()``

kegita commented 9 years ago

Ok, thanks! Another problem: i have edited an user of an arraylist that i have passed to maplist. Before doing carpaccio.getAdapter("user").notifyDataSetChanged(), i have to set the edited user in the correct position of the list. Is there a method to do that o i have to cycling entire list and do a comparison by POJO attribute to find the correct position? Thanks

florent37 commented 9 years ago

You can use list.indexOf Le 4 août 2015 09:07, "kegita" notifications@github.com a écrit :

Ok, thanks! Another problem: i have edited an user of an arraylist that i have passed to maplist. Before doing carpaccio.getAdapter("user").notifyDataSetChanged(), i have to set the edited user in the correct position of the list. Is there a method to do that o i have to cycling entire list and do a comparison by POJO attribute to find the correct position? Thanks

— Reply to this email directly or view it on GitHub https://github.com/florent37/Carpaccio/issues/5#issuecomment-127503727.