Skip to content

Fragments

Dan edited this page Jul 4, 2014 · 3 revisions

Fragments

TimelineFragments

There are several timeline fragments, each of which shows a different Twitter feeds that can be refreshed via pull down the feed layout.

TimelineFragment Screenshot

HomeTimelineFragment

Shows the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends. Build this fragment by calling:

HomeTimelineFragment fragment = HomeTimelineFragment.newInstance();
HomeTimelineFragment fragment = HomeTimelineFragment.newInstance(true); // dark themed

MentionsTimelineFragment

Shows the 20 most recent mentions (tweets containing a users's @screen_name) for the authenticating user. Build this fragment by calling:

MentionsTimelineFragment fragment = MentionsTimelineFragment.newInstance();
MentionsTimelineFragment fragment = MentionsTimelineFragment.newInstance(true); // dark themed

UserTimelineFragment

Shows the 20 most recent statuses posted from the given user. Build this fragment by calling:

UserTimelineFragment fragment = UserTimelineFragment.newInstance("github");
UserTimelineFragment fragment = UserTimelineFragment.newInstance("github", true); // dark themed

ListTimelineFragment

Shows the 20 most recent statuses from the given list. You should retrieve user lists first. Build this fragment by calling:

ListTimelineFragment fragment = ListTimelineFragment.newInstance(userList);
ListTimelineFragment fragment = ListTimelineFragment.newInstance(userList, true); // dark themed

FixedQueryTimelineFragment

Shows the 20 most recent statuses that match a given query. Build this fragment by calling:

FixedQueryTimelineFragment fragment = FixedQueryTimelineFragment.newInstance("#WorldCup");
FixedQueryTimelineFragment fragment = FixedQueryTimelineFragment.newInstance("#WorldCup", true); // dark themed

QueryableTimelineFragment

Contains a search box for searching statuses in Twitter. Build this fragment by calling:

QueryableTimelineFragment fragment = QueryableTimelineFragment.newInstance();
QueryableTimelineFragment fragment = QueryableTimelineFragment.newInstance(true); // dark themed