fab.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(PrivateDealActivity.this, R.color.colorWhite)));
This is not working. How to change background color of floating action button
You can use this code to change the background color:
FloatingActionButton button = findViewById(R.id.your_button);
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP && button instanceof AppCompatButton) {
((AppCompatButton) button).setSupportBackgroundTintList(ColorStateList.valueOf(*your color in integer*));
} else {
ViewCompat.setBackgroundTintList(button, ColorStateList.valueOf(*your color in integer*));
}