0

I'm working on a project that has tab fragments in android. They are A,B,C and D.So the problem comes when I click tab B there is a button called "like" when this button direct to another activity. There we can like or unlike friends. When the back button clicked on that activity the tab B fragment should be updated automatically.

I referred so much in the internet but couldn't find a suitable answer to me. I'm very new to android so I'm asking for your help thanks..

I use this code onResume

public void onResume()
    {  // After a pause OR at startup

        super.onResume();
        setbList(bLikedList);
        getBLiked();
        bListAdapter = new bListAdapter(getActivity(), bLikedList);
        listView.setAdapter(bListAdapter);
        //Refresh your stuff here
    }
Sahan Monaara
  • 55
  • 1
  • 8

1 Answers1

1

Did you try SetCurrentItem(int i) for ViewPager on Call of OnResume()

GreenROBO
  • 4,725
  • 4
  • 23
  • 43