use of android.graphics.PorterDuffColorFilter in project UltimateAndroid by cymcsg.
the class CircularImageView method setSelectorColor.
/**
* Sets the color of the selector to be draw over the
* CircularImageView. Be sure to provide some opacity.
* @param selectorColor The color (including alpha) to set for the selector overlay.
*/
public void setSelectorColor(int selectorColor) {
this.selectorFilter = new PorterDuffColorFilter(selectorColor, PorterDuff.Mode.SRC_ATOP);
this.invalidate();
}
use of android.graphics.PorterDuffColorFilter in project UltimateAndroid by cymcsg.
the class CircularImageView method setSelectorColor.
/**
* Sets the color of the selector to be draw over the
* CircularImageView. Be sure to provide some opacity.
* @param selectorColor The color (including alpha) to set for the selector overlay.
*/
public void setSelectorColor(int selectorColor) {
this.selectorFilter = new PorterDuffColorFilter(selectorColor, PorterDuff.Mode.SRC_ATOP);
this.invalidate();
}
use of android.graphics.PorterDuffColorFilter in project UltimateAndroid by cymcsg.
the class SlidingLayout method dimChildView.
private void dimChildView(View v, float mag, int fadeColor) {
final LayoutParams lp = (LayoutParams) v.getLayoutParams();
if (mag > 0 && fadeColor != 0) {
final int baseAlpha = (fadeColor & 0xff000000) >>> 24;
int imag = (int) (baseAlpha * mag);
int color = imag << 24 | (fadeColor & 0xffffff);
if (lp.dimPaint == null) {
lp.dimPaint = new Paint();
}
lp.dimPaint.setColorFilter(new PorterDuffColorFilter(color, PorterDuff.Mode.SRC_OVER));
if (ViewCompat.getLayerType(v) != ViewCompat.LAYER_TYPE_HARDWARE) {
ViewCompat.setLayerType(v, ViewCompat.LAYER_TYPE_HARDWARE, lp.dimPaint);
}
invalidateChildRegion(v);
} else if (ViewCompat.getLayerType(v) != ViewCompat.LAYER_TYPE_NONE) {
if (lp.dimPaint != null) {
lp.dimPaint.setColorFilter(null);
}
final DisableLayerRunnable dlr = new DisableLayerRunnable(v);
mPostedRunnables.add(dlr);
ViewCompat.postOnAnimation(this, dlr);
}
}
use of android.graphics.PorterDuffColorFilter in project CircularImageView by Pkmmte.
the class CircularImageView method setSelectorColor.
/**
* Sets the color of the selector to be draw over the
* CircularImageView. Be sure to provide some opacity.
* @param selectorColor The color (including alpha) to set for the selector overlay.
*/
public void setSelectorColor(int selectorColor) {
this.selectorFilter = new PorterDuffColorFilter(selectorColor, PorterDuff.Mode.SRC_ATOP);
this.invalidate();
}
use of android.graphics.PorterDuffColorFilter in project CircularImageView by Pkmmte.
the class CircularImageView method setSelectorColor.
/**
* Sets the color of the selector to be draw over the
* CircularImageView. Be sure to provide some opacity.
*
* @param selectorColor
*/
public void setSelectorColor(int selectorColor) {
this.selectorFilter = new PorterDuffColorFilter(selectorColor, PorterDuff.Mode.SRC_ATOP);
this.invalidate();
}
Aggregations