Back to project page Test-SimpleTwitterClient.
The source code is released under:
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...
If you think the Android project Test-SimpleTwitterClient listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.Twitter_Android.Loaders; //from w ww. ja v a 2 s.co m import android.content.Context; import com.example.Twitter_Android.Logic.Tweet; import com.example.Twitter_Android.Net.Connector; import org.json.simple.parser.ParseException; import java.util.ArrayList; import java.util.List; public class HomeTimelineLoader extends TweetLoader<Tweet> { private final long maxID; private final long sinceID; //------------------------------------------------------------------------------------------------------------------ public HomeTimelineLoader(Context context, long maxID, long sinceID) { super(context); /* ????????. ???? ?? ???? ?????????? ?????? ?????? ???? ????? 0. ????? ????????, ??? ??????? ????? ???????? ?????. */ if (maxID != 0 && sinceID != 0) { maxID = 0; } this.maxID = maxID; this.sinceID = sinceID; } //------------------------------------------------------------------------------------------------------------------ @Override public List<Tweet> loadInBackground() { final Connector connector = new Connector(); List<Tweet> loadedTweets = new ArrayList<>(); try { loadedTweets = connector.getStatuses_HomeTimeline(maxID, sinceID, RESULT_COUNT); } catch (ParseException e) { e.printStackTrace(); } setLoadedTweets(loadedTweets); return loadedTweets; } //------------------------------------------------------------------------------------------------------------------ }