Android examples for android.graphics:PorterDuff
parse Tint Mode
//package com.java2s; import android.annotation.TargetApi; import android.graphics.PorterDuff; import android.os.Build; public class Main { @TargetApi(Build.VERSION_CODES.HONEYCOMB) public static PorterDuff.Mode parseTintMode(int value, PorterDuff.Mode defaultMode) { switch (value) { case 3://from ww w. j a va 2s. co m return PorterDuff.Mode.SRC_OVER; case 5: return PorterDuff.Mode.SRC_IN; case 9: return PorterDuff.Mode.SRC_ATOP; case 14: return PorterDuff.Mode.MULTIPLY; case 15: return PorterDuff.Mode.SCREEN; case 16: return PorterDuff.Mode.ADD; default: return defaultMode; } } }