F0RIS/sweet-alert-dialog

How do you display long text?

Closed this issue · 4 comments

长文字怎么显示?我看超过两行就后面的不显示。
How do you display long text? I see more than two lines on the back does not show.

F0RIS commented

Put ur long text in message field instead of title
Example
image

And u can create custom view and set it via setCustomView method
Example
image

CWlf commented

I use setTitleText() for title and setContentText() for message but it is also very short text. :(

you can add text like this
final TextView editText = new TextView(context); editText.setText(content); SweetAlertDialog dialog = new SweetAlertDialog(context, SweetAlertDialog.ERROR_TYPE) .setTitleText(title) .setCustomView(editText); dialog.show();

OK, Thanks