Android Open Source - LiveBlurListView Fast Bitmap Drawable






From Project

Back to project page LiveBlurListView.

License

The source code is released under:

Apache License

If you think the Android project LiveBlurListView 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.koalcat.blurdemo;
/**//w ww.  j  a va2 s . c om
 * @author xuchdeid@gmail.com
 *  __________________________     \_/
   |                          |   /._.\
   |  Android!Android!         > U|   |U
   |                xuchdeid  |   |___|
   |__________________________|    U U
 * */
import android.graphics.drawable.Drawable;
import android.graphics.PixelFormat;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;

public class FastBitmapDrawable extends Drawable {
  private Bitmap mBitmap;

  public FastBitmapDrawable(Bitmap b) {
    mBitmap = b;
  }

  @Override
  public void draw(Canvas canvas) {
    canvas.drawBitmap(mBitmap, 0.0f, 0.0f, null);
  }

  @Override
  public int getOpacity() {
    return PixelFormat.TRANSLUCENT;
  }

  @Override
  public void setAlpha(int alpha) {}

  @Override
  public void setColorFilter(ColorFilter cf) {}

  @Override
  public int getIntrinsicWidth() {
    return mBitmap.getWidth();
  }

  @Override
  public int getIntrinsicHeight() {
    return mBitmap.getHeight();
  }

  @Override
  public int getMinimumWidth() {
    return mBitmap.getWidth();
  }

  @Override
  public int getMinimumHeight() {
    return mBitmap.getHeight();
  }

  public Bitmap getBitmap() {
    return mBitmap;
  }
}




Java Source Code List

com.koalcat.blurdemo.AppInfo.java
com.koalcat.blurdemo.ApplicationsAdapter.java
com.koalcat.blurdemo.BlurActivity.java
com.koalcat.blurdemo.FastBitmapDrawable.java
com.koalcat.blurdemo.HanziToPinyin.java
com.koalcat.blurdemo.IndexCursor.java
com.koalcat.blurdemo.Utilities.java
com.koalcat.view.BaseRender.java
com.koalcat.view.BlurRSRender.java
com.koalcat.view.Blur.java
com.koalcat.view.GLRender.java
com.koalcat.view.JNIRender.java
com.koalcat.view.LiveBlurListView.java
com.koalcat.view.LiveBlurViewGroup.java
com.koalcat.view.RSRender.java
com.koalcat.view.ScriptIntrinsicBlurRender.java