is there any way to make a SnackBar wrapping its text content?
You can look up my problem below:
As you can see the text ends at "contact us at...." and it should display the entire message.
Thank you!
is there any way to make a SnackBar wrapping its text content?
You can look up my problem below:
As you can see the text ends at "contact us at...." and it should display the entire message.
Thank you!
I believe that snackbar by default limits you to only 2 lines.
One thing that you could try is setting the textview inside snackbar to be multiline. Like so:
View snackbarView = snackbar.getView();
TextView textView = (TextView) snackbarView.findViewById(android.support.design.R.id.snackbar_text);
textView.setMaxLines(5); //set the max lines for textview to show multiple lines
Let me know if that works or not
© 2022 - 2024 — McMap. All rights reserved.
snackbar.view.findViewById<TextView>(com.google.android.material.R.id.snackbar_text).maxLines = 5
– Cypripedium