hi guys i am struggling 2 days with a recycle view i have a fragment include a recycle view i have a dialog fragment in this fragment and i want when dialog dissmissed recycle view update
this is ovvrerid on dissmiss method in dialog fragment
somefragment fragment = new somefragment ();
var trance=Activity.SupportFragmentManager.BeginTransaction();
trance.Detach(fragment);
trance.Attach(fragment);
trance.Commit();
after that i get new data in onstart and give it to adapter again and when i check with break point every thing is fine but still recycle dose not update
list = await DownloadDataFromServer<List<Cilinic>>(uri + Handel.CurrentCityId);
myAdapter = new RecyclerAdapter(list);
myRecyclerView.SetAdapter(myAdapter);
myAdapter.NotifyDataSetChanged();
please help me out
Try adding this to your code
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
myRecyclerView.setLayoutManager(mLayoutManager);
myRecyclerView.setItemAnimator(new DefaultItemAnimator());
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.