My pager adapter ( extends PagerAdepter ) has a textview in it. And I update this textview with MainActivity\'s onPageSelected . Its update textview for position > 0 , but start
It seems to me that what you really want to be doing is overriding getPageTitle(), and then, somewhere else, grabbing that page title and setting it as a TextView's text.
That way when you initialize your activity, initialize the PagerAdapter and call getTitle(0)
. This will get you the title for page 0. Now set that in the Activity's textview. Later, whenever you change pages just call getTitle(newPosition)
and update that TextView.