use of tr.bcxip.hummingbird.adapters.FeedTimelineAdapter in project Hummingbird-for-Android by xiprox.
the class FeedFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_feed, null);
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mList = (InfiniteScrollListView) rootView.findViewById(R.id.feed_list);
mList.setLoadingView(layoutInflater.inflate(R.layout.loading_view, null));
mList.setLoadingMode(InfiniteScrollListView.LoadingMode.SCROLL_TO_BOTTOM);
mList.setStopPosition(InfiniteScrollListView.StopPosition.REMAIN_UNCHANGED);
adapter = new FeedTimelineAdapter(context, mItems, this);
adapter.setLoadingMode(InfiniteScrollListView.LoadingMode.SCROLL_TO_BOTTOM);
adapter.setStopPosition(InfiniteScrollListView.StopPosition.REMAIN_UNCHANGED);
mList.setAdapter(adapter);
mFlipper = (ViewFlipper) rootView.findViewById(R.id.feed_view_flipper);
mErrorView = (ErrorView) rootView.findViewById(R.id.feed_error_view);
mErrorView.setOnRetryListener(this);
/**
* Check for any username arguments being passed to the fragment. If one is passed, we will
* load the feed for that username. If no argument is passed, we load the feed for the
* currently logged in user.
*/
if (getArguments() != null && getArguments().getString(ARG_USERNAME) != null) {
username = getArguments().getString(ARG_USERNAME);
executeLoadTask();
} else if (prefMan.getUsername() != null) {
username = prefMan.getUsername();
executeLoadTask();
} else
Log.e(TAG, "Username not found! Is there a problem with the logged user?");
return rootView;
}
use of tr.bcxip.hummingbird.adapters.FeedTimelineAdapter in project Hummingbird-for-Android by xiprox.
the class TimelineFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.fragment_timeline, null);
LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mList = (InfiniteScrollListView) rootView.findViewById(R.id.timeline_list);
mList.setLoadingView(layoutInflater.inflate(R.layout.loading_view, null));
mList.setLoadingMode(InfiniteScrollListView.LoadingMode.SCROLL_TO_BOTTOM);
mList.setStopPosition(InfiniteScrollListView.StopPosition.REMAIN_UNCHANGED);
adapter = new FeedTimelineAdapter(context, mItems, this);
adapter.setLoadingMode(InfiniteScrollListView.LoadingMode.SCROLL_TO_BOTTOM);
adapter.setStopPosition(InfiniteScrollListView.StopPosition.REMAIN_UNCHANGED);
mList.setAdapter(adapter);
mFlipper = (ViewFlipper) rootView.findViewById(R.id.timeline_view_flipper);
mErrorView = (ErrorView) rootView.findViewById(R.id.timeline_error_view);
mErrorView.setOnRetryListener(this);
exceuteLoadTask();
return rootView;
}
Aggregations