Android Open Source - Tvdb-Api-Android Lru Bitmap Cache






From Project

Back to project page Tvdb-Api-Android.

License

The source code is released under:

Apache License

If you think the Android project Tvdb-Api-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 com.sburba.tvdbapi.example;
/*from w ww. ja  v  a2 s  .c o  m*/

import android.graphics.Bitmap;
import android.support.v4.util.LruCache;

import com.android.volley.toolbox.ImageLoader;

public class LruBitmapCache extends LruCache<String, Bitmap> implements ImageLoader.ImageCache {

    public LruBitmapCache(int maxSize) {
        super(maxSize);
    }

    @Override
    protected int sizeOf(String key, Bitmap value) {
        return value.getRowBytes() * value.getHeight();
    }

    @Override
    public Bitmap getBitmap(String url) {
        Bitmap bitmap = get(url);
        return get(url);
    }

    @Override
    public void putBitmap(String url, Bitmap bitmap) {
        put(url, bitmap);
    }
}




Java Source Code List

com.sburba.tvdbapi.TvdbApi.java
com.sburba.tvdbapi.TvdbItemAdapter.java
com.sburba.tvdbapi.example.App.java
com.sburba.tvdbapi.example.EpisodeListActivity.java
com.sburba.tvdbapi.example.LruBitmapCache.java
com.sburba.tvdbapi.example.SeasonListActivity.java
com.sburba.tvdbapi.example.SeriesListActivity.java
com.sburba.tvdbapi.model.Actor.java
com.sburba.tvdbapi.model.Banner.java
com.sburba.tvdbapi.model.Episode.java
com.sburba.tvdbapi.model.Season.java
com.sburba.tvdbapi.model.Series.java
com.sburba.tvdbapi.model.TvdbItem.java
com.sburba.tvdbapi.parser.ActorListParser.java
com.sburba.tvdbapi.parser.BannerListParser.java
com.sburba.tvdbapi.parser.EpisodeParser.java
com.sburba.tvdbapi.parser.SeasonListParser.java
com.sburba.tvdbapi.parser.SeriesParser.java
com.sburba.tvdbapi.util.ThreadPreconditions.java
com.sburba.tvdbapi.xml.XmlException.java
com.sburba.tvdbapi.xml.XmlObjectListParser.java
com.sburba.tvdbapi.xml.XmlObjectListRequest.java
com.sburba.tvdbapi.xml.XmlObjectParser.java
com.sburba.tvdbapi.xml.XmlObjectRequest.java
com.sburba.tvdbapi.xml.XmlRequest.java
com.sburba.tvdbapi.xml.XmlUtil.java
com.sburba.tvdbapi.xml.ZippedXmlObjectListRequest.java