@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    client = TwitterApplication.getRestClient();
    current_id = new Long(max_id);
  }
Пример #2
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   TwitterApp.getRestClient()
       .getMentionsTimeline(
           new JsonHttpResponseHandler() {
             @Override
             public void onSuccess(JSONArray jsonTweets) {
               getAdapter().addAll(Tweet.fromJson(jsonTweets));
             }
           });
 }
Пример #3
0
  @Override
  public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.i("DEBUG", "inside onCreate of HomeTimelineFragment");

    TweetsArrayAdapter adapter = getAdapter();
    adapter.setProfileImageListener(
        new TweetsArrayAdapter.ProfileImageListener() {
          @Override
          public void onProfileImgSelected(User user) {
            Intent i = new Intent(getContext(), ProfileActivity.class);
            i.putExtra("user", user);
            // Toast.makeText(getContext(), "Event fired", Toast.LENGTH_SHORT).show();
            startActivity(i);
          }
        });

    client = TwitterApplication.getRestClient();
    populateTimeLine(0);
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    swipeContainer.setOnRefreshListener(
        new SwipeRefreshLayout.OnRefreshListener() {
          @Override
          public void onRefresh() {
            // Your code to refresh the list here.
            // Make sure you call swipeContainer.setRefreshing(false)
            // once the network request has completed successfully.
            refreshTweets();
          }
        });

    lvTweets.setOnScrollListener(
        new EndlessScrollListener() {
          @Override
          public void onLoadMore(int page, int totalItemsCount) {
            populateTimeline();
          }
        });

    populateTimeline();
  }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   // TODO Auto-generated method stub
   super.onCreate(savedInstanceState);
 }
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   client = TwitterApplication.getRestClient();
   populateTimeline();
 }