android - Update gridview in viewpager -


I am searching for a while to refresh a gridview within a viewer and I do not have any answer yet have been found. The more specificity is my problem that I have a view pager with three gridviews. Each gridview is populated by an arraylist and if the array list is changed then the gridview remains on it. How do I update it? I have tried to call the notifydatasetchange on the adapter and it does not help.

This is my code for pager adapters to see

  public class favorite WeaverPaper runs up to FragmentStatePagerAdapter {public favorite VIPager (Fragment Manager FM) {Super (FM); } @ Override Public Fragment Mill Itam (Int'l) {Usagerbasehadler UDH = New UserGroup (getActivity ()); Switch (i) {Case 0: Arrayist & lt; Exercise & gt; Strength List = UDH.Greative Exxchers ("Strastacres"); UDH.close (); Return FavoriteExcorez New instant (power list); Case 1: Arrestist and Exercise; Exercise & gt; Stretch list = UDHGetretext ("Streaking Excerpts"); UDH.close (); Return FavoritesExcore.Nuance (stretch list); Case 2: Arrayist & lt; Exercise & gt; WarmupList = UDH.getFavoriteExercises ("Warmup Assassins"); UDH.close (); Return FavoritesExcore.Newense (hotlist list); Default: ArrayList & lt; Exercise & gt; Temp = UDH .getFavoriteExercises ("Warm up Accelerator"); UDH.close (); Returns FavoriteExcoreres New instant (temporary); }} @ Override Public Inaccount () {Return 3; }}  

If your pager has only two pages, then you use the FragmentPager adapter should do. You can find fragments of Fragment Bioteg to find this piece. Then call this piece of call appointment method.

  string snippet = meffragmentname (_viewPager.getId (), i); Piece frag = _fragmentManager.findFragmentByTag (fragmentName); Private Static String Muffragmantnam (IntuView ID, Int Index) {Return "Android: Switcher:" + View ID + ":" + Index; }  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -