Android Open Source - SandB-Android Scarlet And Black Application






From Project

Back to project page SandB-Android.

License

The source code is released under:

GNU General Public License

If you think the Android project SandB-Android 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 edu.grinnell.sandb;
/* w  w  w .j  a  v  a 2 s  .c  o m*/
import android.annotation.TargetApi;
import android.app.Application;
import android.os.AsyncTask;
import android.os.Build;

import com.nostra13.universalimageloader.cache.memory.impl.LruMemoryCache;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

public class ScarletAndBlackApplication extends Application {
  
  @TargetApi(11)
  @Override
    public void onCreate() {
        super.onCreate();
        
        // Create global configuration and initialize ImageLoader with this configuration
        ImageLoaderConfiguration.Builder configb = new ImageLoaderConfiguration.Builder(this)
          .denyCacheImageMultipleSizesInMemory()
          .memoryCache(new LruMemoryCache(2 * 1024 * 1024))
          .memoryCacheSize(6 * 1024 * 1024)
          .discCacheSize(100 * 1024 * 1024)
          .discCacheFileCount(100);
         // .enableLogging();
        
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
          configb = configb.taskExecutor(AsyncTask.THREAD_POOL_EXECUTOR)
                   .taskExecutorForCachedImages(AsyncTask.THREAD_POOL_EXECUTOR);
        }
        
        ImageLoader.getInstance().init(configb.build());
    }
}




Java Source Code List

edu.grinnell.sandb.ArticleDetailActivity.java
edu.grinnell.sandb.ArticleDetailFragment.java
edu.grinnell.sandb.ArticleListAdapter.java
edu.grinnell.sandb.ArticleListFragment.java
edu.grinnell.sandb.CommentListAdapter.java
edu.grinnell.sandb.CommentListFragment.java
edu.grinnell.sandb.ImagePagerActivity.java
edu.grinnell.sandb.MainActivity.java
edu.grinnell.sandb.MainPrefs.java
edu.grinnell.sandb.ScarletAndBlackApplication.java
edu.grinnell.sandb.Utility.java
edu.grinnell.sandb.comments.CommentStorageHelper.java
edu.grinnell.sandb.comments.CommentTable.java
edu.grinnell.sandb.comments.Comment.java
edu.grinnell.sandb.data.ArticleStorageHelper.java
edu.grinnell.sandb.data.ArticleTable.java
edu.grinnell.sandb.data.Article.java
edu.grinnell.sandb.img.BodyImageGetter.java
edu.grinnell.sandb.img.ImageStorageHelper.java
edu.grinnell.sandb.img.ImageTable.java
edu.grinnell.sandb.img.Image.java
edu.grinnell.sandb.img.UniversalLoaderUtility.java
edu.grinnell.sandb.xmlpull.CommentParseTask.java
edu.grinnell.sandb.xmlpull.XmlCheckAgeTask.java
edu.grinnell.sandb.xmlpull.XmlFetchTask.java
edu.grinnell.sandb.xmlpull.XmlParseTask.java
edu.grinnell.sandb.xmlpull.XmlPullReceiver.java
edu.grinnell.sandb.xmlpull.XmlPullService.java