Android tint icon in FloatingActionButton

Drawable fabDr= mFAB.getDrawable();
DrawableCompat.setTint(fabDr, Color.WHITE);

I'm assuming favoriteFab is your FloatingActionButton. You can use:

int color = ContextCompat.getColor(this, R.color.yellow);
favoriteFab.getDrawable().setColorFilter(color, PorterDuff.Mode.SRC_IN);

You can simple use the DrawableCompat in support-v4 as follows:

    Drawable drawable = mFloatingActionButton.getDrawable();
    // Wrap the drawable so that future tinting calls work
    // on pre-v21 devices. Always use the returned drawable.
    drawable = DrawableCompat.wrap(drawable);

    // We can now set a tint
    DrawableCompat.setTint(drawable, ContextCompat.getColor(this, R.color.white));
    // ...or a tint list
    DrawableCompat.setTintList(drawable, ColorStateList.valueOf(ContextCompat.getColor(this, R.color.white)));

    // ...and a different tint mode
    DrawableCompat.setTintMode(drawable, PorterDuff.Mode.SRC_OVER);

You can set the color tint of the drawable like this if you are using API 21 or above.

mFAB.getDrawable().mutate().setTint(getResources().getColor(R.color.yourColor));

E.g.

mFAB = (FloatingActionButton) findViewById(R.id.fab);
mFAB.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        Snackbar.make(v, "Yummy snackbar", LENGHT_LONG).show();
    }
});
mFAB.getDrawable().mutate().setTint(getResources().getColor(R.color.colorAccent));

Update: Since getColor has been deprecated you should use ContextCompat instead. Use the following e.g:

mFAB.getDrawable().mutate().setTint(ContextCompat.getColor(this, R.color.colorAccent));