Good afternoon,
I am working with Snackbars and I try to put an aciton (like UNDO), but the text is not aligned to the right of the screen.
The result I need :
The result I have :
As you can see, the "UNDO" action is not aligned right, as I need.
Here is my Snackbar code :
Snackbar snackbar = Snackbar.make(mMainContent, "Message deleted", Snackbar.LENGTH_LONG)
.setAction("UNDO", new View.OnClickListener() {
@Override
//Todo: Click on "UNDO"
public void onClick(View view) {
}
});
snackbar.setActionTextColor(ContextCompat.getColor(getApplicationContext(), R.color.white));
View snackbarView = snackbar.getView();
snackbarView.setBackgroundColor(ContextCompat.getColor(getApplicationContext(), R.color.colorAccent));
snackbar.show();
Can someone help me ?
Thank you !