Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content text cut off #197

Open
jaymin19syno opened this issue Apr 26, 2019 · 3 comments
Open

Content text cut off #197

jaymin19syno opened this issue Apr 26, 2019 · 3 comments

Comments

@jaymin19syno
Copy link

jaymin19syno commented Apr 26, 2019

Text of the content is not showing as the string is. It will cut some text from the end. I have tested on moto g6 play and one plus five.

The original string is : "Thank you for posting your load.\nPlease be on the standby for transports associate bid." I have declared string in string.xml file.

@leewust
Copy link

leewust commented Nov 29, 2019

Yes

@FDuhen
Copy link

FDuhen commented Mar 2, 2020

The Textview is configured as a single line.
You can override the SweetAlertDialog to fix it

`
public class SweetAlertDialogMulti extends SweetAlertDialog {

public SweetAlertDialogMulti(Context context, int alertType) {
    super(context, alertType);

    this.setOnShowListener(dialog -> {
        SweetAlertDialog alertDialog = (SweetAlertDialog) dialog;
        TextView text = alertDialog.findViewById(R.id.content_text);
        text.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
        text.setLines(3);
    });
}

}

`

@jaymin19syno
Copy link
Author

The Textview is configured as a single line.
You can override the SweetAlertDialog to fix it

`
public class SweetAlertDialogMulti extends SweetAlertDialog {

public SweetAlertDialogMulti(Context context, int alertType) {
    super(context, alertType);

    this.setOnShowListener(dialog -> {
        SweetAlertDialog alertDialog = (SweetAlertDialog) dialog;
        TextView text = alertDialog.findViewById(R.id.content_text);
        text.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
        text.setLines(3);
    });
}

}

`

Thanks for your valuable reply. I will check this and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants