MenuItem tinting on AppCompat Toolbar

After the new Support library v22.1, you can use something similar to this: @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_home, menu); Drawable drawable = menu.findItem(R.id.action_clear).getIcon(); drawable = DrawableCompat.wrap(drawable); DrawableCompat.setTint(drawable, ContextCompat.getColor(this,R.color.textColorPrimary)); menu.findItem(R.id.action_clear).setIcon(drawable); return true; }

How to set tint for an image view programmatically in android?

UPDATE: @ADev has newer solution in his answer here, but his solution requires newer support library – 25.4.0 or above. You can change the tint, quite easily in code via: imageView.setColorFilter(Color.argb(255, 255, 255, 255)); // White Tint If you want color tint then imageView.setColorFilter(ContextCompat.getColor(context, R.color.COLOR_YOUR_COLOR), android.graphics.PorterDuff.Mode.MULTIPLY); For Vector Drawable imageView.setColorFilter(ContextCompat.getColor(context, R.color.COLOR_YOUR_COLOR), android.graphics.PorterDuff.Mode.SRC_IN);

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)