use of com.naman14.timber.widgets.MultiViewPager in project Timber by naman14.
the class ArtistBioFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_artist_bio, container, false);
Artist artist = ArtistLoader.getArtist(getActivity(), artistID);
LastFmClient.getInstance(getActivity()).getArtistInfo(new ArtistQuery(artist.name), new ArtistInfoListener() {
@Override
public void artistInfoSucess(LastfmArtist artist) {
}
@Override
public void artistInfoFailed() {
}
});
final MultiViewPager pager = (MultiViewPager) rootView.findViewById(R.id.tagspager);
final FragmentStatePagerAdapter adapter = new FragmentStatePagerAdapter(getActivity().getSupportFragmentManager()) {
@Override
public int getCount() {
return 20;
}
@Override
public Fragment getItem(int position) {
return ArtistTagFragment.newInstance(position);
}
};
pager.setAdapter(adapter);
return rootView;
}
Aggregations