FindNetworkActivity.SectionsPagerAdapter¶
-
public class
SectionsPagerAdapter
extends FragmentPagerAdapter¶ A
FragmentPagerAdapter
that returns a fragment corresponding to one of the two available tabs:From
, for location-based networks, andSpeaks
, for language-based networks.
Constructors¶
SectionsPagerAdapter¶
-
SectionsPagerAdapter
(FragmentManager fm)¶ -
Parameters: - fm – {@inheritDoc}
Methods¶
getItem¶
-
public Fragment
getItem
(int position)¶ Get the appropriate fragment depending on which tab is selected
Parameters: - position – Either
0
, fornear
or1
, forspeaks
Returns: FindLocationFragment
forposition=1
,FindLanguageFragment
otherwise.- position – Either
getPageTitle¶
-
public CharSequence
getPageTitle
(int position)¶ Get the titles for each tab
Parameters: - position – Position of tab to get name of (
0
or1
)
Returns: Reference to name of tab
- position – Position of tab to get name of (