how can I change the background color of action button in snackbar or make it dissapear (grey background)?
i use this code:
Snackbar mysnack = Snackbar.make(main_layout, getResources().getString(R.string.snack_1), 5000);
View view = mysnack.getView();
TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);
tv.setTextColor(getResources().getColor(R.color.text_light));
mysnack.setActionTextColor(getResources().getColor(R.color.text_light));
mysnack.setAction("RATE", new View.OnClickListener() {
@Override
public void onClick(View view) {
Uri uri = Uri.parse(getResources().getString(R.string.snack_url));
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
}
});
TypedValue typedValue = new TypedValue();
getTheme().resolveAttribute(R.attr.colorPrimaryDark, typedValue, true);
final int color = typedValue.data;
mysnack.getView().setBackgroundColor(color);
mysnack.show();
and my question is not duplicate. I ask for BACKGROUND color and not the text color. First we read, then we understand, then we think and then we decide to write that someone's question is a duplicate.