Android Open Source - image-loader Demos






From Project

Back to project page image-loader.

License

The source code is released under:

Apache License

If you think the Android project image-loader 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.novoda.imageloader.demo.activity;
/* ww w . j  a v a  2s .c om*/
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.novoda.imageloader.demo.R;
import com.novoda.imageloader.demo.util.BugSenseHelper;
import com.novoda.imageloader.demo.util.BugsenseApiKeyFailedException;

/**
 * Nothing really interesting here just a dashboard.
 */
public class Demos extends Activity implements OnItemClickListener {

    private static final boolean LIST_VIEW = false;
    private static final boolean GRID_VIEW = true;

    private BugSenseHelper bugsenseHelper;
    private final int fadeIn = R.anim.fade_in;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        bugsenseHelper = new BugSenseHelper(this);

        try {
            bugsenseHelper.initBugSense();
        } catch (BugsenseApiKeyFailedException e) {
            e.printStackTrace();
        }
        setContentView(R.layout.demos);
        ListView entries = (ListView) findViewById(R.id.demo_list);
        entries.setOnItemClickListener(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        bugsenseHelper.closeBugsense();
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        switch (position) {
            case 0:
                startActivity(ImageLongList.class);
                break;
            case 1:
                startActivity(ImageLongList.class, fadeIn, LIST_VIEW);
                break;
            case 2:
                startActivity(ImageLongList.class, fadeIn, GRID_VIEW);
                break;
            case 3:
                startActivity(LongSmallImageList.class);
                break;
            case 4:
                startActivity(LongSmallImageList.class, fadeIn, LIST_VIEW);
                break;
            case 5:
                startActivity(LongSmallImageList.class, fadeIn, GRID_VIEW);
                break;
            case 6:
                startActivity(BigImages.class);
                break;
            case 7:
                startActivity(BigImages.class, fadeIn, LIST_VIEW);
                break;
            case 8:
                startActivity(DirectLoading.class);
                break;
            case 9:
                startActivity(DirectLoading.class, fadeIn, LIST_VIEW);
                break;
            default:
                break;
        }
    }

    private void startActivity(Class<? extends Activity> activity) {
        startActivity(createIntent(activity, -1, false));
    }

    private void startActivity(Class<? extends Activity> activity, int animationId, boolean isGrid) {
        startActivity(createIntent(activity, animationId, isGrid));
    }

    private Intent createIntent(Class<? extends Activity> activity, int animationId, boolean isGrid) {
        Intent intent = createActivityIntent(activity);
        intent.putExtra("animated", animationId);
        intent.putExtra("grid", isGrid);
        return intent;
    }

    private Intent createActivityIntent(Class<? extends Activity> activity) {
        return new Intent(Demos.this, activity);
    }

}




Java Source Code List

com.novoda.imageloader.acceptance.BitmapUtilsInstrumentationTest.java
com.novoda.imageloader.acceptance.BitmapUtilsShould.java
com.novoda.imageloader.acceptance.ImageLoaderDemoActivityTest.java
com.novoda.imageloader.acceptance.ImageManagerInstrumentationTest.java
com.novoda.imageloader.acceptance.LruBitmapCacheInstrumentationTest.java
com.novoda.imageloader.core.ImageManager.java
com.novoda.imageloader.core.LoaderContext.java
com.novoda.imageloader.core.LoaderSettings.java
com.novoda.imageloader.core.OnImageLoadedListener.java
com.novoda.imageloader.core.bitmap.BitmapUtil.java
com.novoda.imageloader.core.cache.CacheManager.java
com.novoda.imageloader.core.cache.LruBitmapCache.java
com.novoda.imageloader.core.cache.NoCache.java
com.novoda.imageloader.core.cache.SoftMapCache.java
com.novoda.imageloader.core.cache.util.LruCache.java
com.novoda.imageloader.core.exception.ImageCopyException.java
com.novoda.imageloader.core.exception.ImageNotFoundException.java
com.novoda.imageloader.core.exception.MissingSettingException.java
com.novoda.imageloader.core.file.BasicFileManager.java
com.novoda.imageloader.core.file.FileManager.java
com.novoda.imageloader.core.file.util.AndroidFileContext.java
com.novoda.imageloader.core.file.util.FileUtil.java
com.novoda.imageloader.core.file.util.FlushedInputStream.java
com.novoda.imageloader.core.loader.ConcurrentLoader.java
com.novoda.imageloader.core.loader.Loader.java
com.novoda.imageloader.core.loader.SimpleLoader.java
com.novoda.imageloader.core.loader.util.AsyncResult.java
com.novoda.imageloader.core.loader.util.AsyncTask.java
com.novoda.imageloader.core.loader.util.BitmapDisplayer.java
com.novoda.imageloader.core.loader.util.BitmapRetriever.java
com.novoda.imageloader.core.loader.util.LoaderTask.java
com.novoda.imageloader.core.loader.util.SingleThreadedLoader.java
com.novoda.imageloader.core.model.ImageTagFactory.java
com.novoda.imageloader.core.model.ImageTag.java
com.novoda.imageloader.core.model.ImageWrapper.java
com.novoda.imageloader.core.network.NetworkManager.java
com.novoda.imageloader.core.network.UrlNetworkManager.java
com.novoda.imageloader.core.network.UrlUtil.java
com.novoda.imageloader.core.util.AnimationHelper.java
com.novoda.imageloader.core.util.DirectLoader.java
com.novoda.imageloader.core.util.Log.java
com.novoda.imageloader.demo.DemoApplication.java
com.novoda.imageloader.demo.activity.BigImages.java
com.novoda.imageloader.demo.activity.Demos.java
com.novoda.imageloader.demo.activity.DirectLoading.java
com.novoda.imageloader.demo.activity.ImageLongList.java
com.novoda.imageloader.demo.activity.LongSmallImageList.java
com.novoda.imageloader.demo.activity.base.ImageLoaderBaseActivity.java
com.novoda.imageloader.demo.provider.CustomUriMatcher.java
com.novoda.imageloader.demo.provider.DatabaseManager.java
com.novoda.imageloader.demo.provider.ImageLoaderDemoProvider.java
com.novoda.imageloader.demo.provider.SqlFile.java
com.novoda.imageloader.demo.util.BugSenseHelper.java
com.novoda.imageloader.demo.util.BugsenseApiKeyFailedException.java