Hi there I have been using the ViewPagerIndicator library for some time now and I want my action-bar's title to change every time the user swipes to another Fragment to the other pages here is the code I am thinking off but it is just not working.
Activity miz = getActivity();
miz.setTitle("Miz");
I have put this code in all my Fragments displaying different titles every time but for some reason it is not working properly as it is always late. I think it may have something to do with the OnCreate , OnResume or OnPause and can not lay a finger on it can some one help ? I want the Title of the Action Bar to change while the next Fragment is visible to the user.
I have also though of some code like this
@Override
public void onResume() {
// TODO Auto-generated method stub
super.onResume();
Activity miz = getActivity();
miz.setTitle("Miz");
}