Example usage for android.graphics ColorMatrix reset

List of usage examples for android.graphics ColorMatrix reset

Introduction

In this page you can find the example usage for android.graphics ColorMatrix reset.

Prototype

public void reset() 

Source Link

Document

Set this colormatrix to identity:
 [ 1 0 0 0 0   - red vector 0 1 0 0 0   - green vector 0 0 1 0 0   - blue vector 0 0 0 1 0 ] - alpha vector 

Usage

From source file:java_lang_programming.com.android_media_demo.article80.ImageFragment.java

/**
 * /* w  w w .  j ava 2 s.  c o m*/
 */
private void grayScaleClear() {
    ColorMatrix matrix = new ColorMatrix();
    matrix.reset();
    ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix);
    imageView.setColorFilter(filter);
    imageView.setImageResource(R.drawable.sample_20161204_180343);
}