Android Open Source - twittah Twitter Application






From Project

Back to project page twittah.

License

The source code is released under:

MIT License

If you think the Android project twittah listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.codepath.wangela.apps.twittah.activities;
/*  w w w .ja  v a2s. c o m*/
import android.content.Context;

import com.codepath.wangela.apps.twittah.helpers.TwitterClient;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

/*
 * This is the Android application itself and is used to configure various settings
 * including the image cache in memory and on disk. This also adds a singleton
 * for accessing the relevant rest client.
 * 
 *     RestClient client = RestClientApp.getRestClient();
 *     // use client to send requests to API
 *     
 */
public class TwitterApplication extends com.activeandroid.app.Application {
  private static Context context;
  
    @Override
    public void onCreate() {
        super.onCreate();
        TwitterApplication.context = this;
        
        // Create global configuration and initialize ImageLoader with this configuration
        DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder().
            cacheInMemory().cacheOnDisc().build();
        ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(getApplicationContext())
            .defaultDisplayImageOptions(defaultOptions)
            .build();
        ImageLoader.getInstance().init(config);
    }
    
    public static TwitterClient getRestClient() {
      return (TwitterClient) TwitterClient.getInstance(TwitterClient.class, TwitterApplication.context);
    }
}




Java Source Code List

com.codepath.wangela.apps.twittah.activities.ComposeActivity.java
com.codepath.wangela.apps.twittah.activities.LoginActivity.java
com.codepath.wangela.apps.twittah.activities.ProfileActivity.java
com.codepath.wangela.apps.twittah.activities.TimelineActivity.java
com.codepath.wangela.apps.twittah.activities.TweetDetailActivity.java
com.codepath.wangela.apps.twittah.activities.TwitterApplication.java
com.codepath.wangela.apps.twittah.adapters.TweetArrayAdapter.java
com.codepath.wangela.apps.twittah.fragments.HomeTimelineFragment.java
com.codepath.wangela.apps.twittah.fragments.MentionsTimelineFragment.java
com.codepath.wangela.apps.twittah.fragments.TweetsListFragment.java
com.codepath.wangela.apps.twittah.fragments.UserTimelineFragment.java
com.codepath.wangela.apps.twittah.helpers.TwitterClient.java
com.codepath.wangela.apps.twittah.listeners.EndlessScrollListener.java
com.codepath.wangela.apps.twittah.listeners.SupportFragmentTabListener.java
com.codepath.wangela.apps.twittah.models.Category.java
com.codepath.wangela.apps.twittah.models.Item.java
com.codepath.wangela.apps.twittah.models.SampleModel.java
com.codepath.wangela.apps.twittah.models.Tweet.java
com.codepath.wangela.apps.twittah.models.User.java