Home | History | Annotate | Download | only in com.example.android.drawabletinting

Lines Matching refs:Mode

43  * a reference to a color and a PorterDuff blend mode. The color and blend mode can be
46 * @see android.graphics.drawable.Drawable#setColorFilter(int, android.graphics.PorterDuff.Mode)
47 * @see android.graphics.drawable.Drawable#setTint(android.content.res.ColorStateList, android.graphics.PorterDuff.Mode)
106 * Selected color tinting mode.
108 private PorterDuff.Mode mMode;
135 private static final PorterDuff.Mode[] MODES = new PorterDuff.Mode[]{
136 PorterDuff.Mode.ADD,
137 PorterDuff.Mode.CLEAR,
138 PorterDuff.Mode.DARKEN,
139 PorterDuff.Mode.DST,
140 PorterDuff.Mode.DST_ATOP,
141 PorterDuff.Mode.DST_IN,
142 PorterDuff.Mode.DST_OUT,
143 PorterDuff.Mode.DST_OVER,
144 PorterDuff.Mode.LIGHTEN,
145 PorterDuff.Mode.MULTIPLY,
146 PorterDuff.Mode.OVERLAY,
147 PorterDuff.Mode.SCREEN,
148 PorterDuff.Mode.SRC,
149 PorterDuff.Mode.SRC_ATOP,
150 PorterDuff.Mode.SRC_IN,
151 PorterDuff.Mode.SRC_OUT,
152 PorterDuff.Mode.SRC_OVER,
153 PorterDuff.Mode.XOR
188 // Set up the spinner for blend mode selection from a string array resource
193 // Set a listener to update the tinted image when a blend mode is selected
208 // Apply the default blend mode and color
240 * Returns the {@link android.graphics.PorterDuff.Mode} for the selected tint mode option.
242 * @return selected tint mode
244 public PorterDuff.Mode getTintMode() {
249 * Update the tint of the image with the color set in the seekbars and selected blend mode.
252 * {@link Color#argb(int, int, int, int)}, it is set togethe with the blend mode on the background
254 * {@link android.widget.ImageView#setColorFilter(int, android.graphics.PorterDuff.Mode)}.
256 public void updateTint(int color, PorterDuff.Mode mode) {
260 // Set the color tint mode based on the selection of the Spinner
261 mMode = mode;
264 Log.d(TAG, String.format("Updating tint with color [ARGB: %d,%d,%d,%d] and mode [%s]",
266 mode.toString()));
268 // Apply the color tint for the selected tint mode
279 * Listener that updates the tint when a blend mode is selected.
286 // Selected a blend mode and update the tint of image