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

Crashed Hint Texts When Same Alert Is Reused #18

Open
simongiesen opened this issue Aug 23, 2023 · 0 comments
Open

Crashed Hint Texts When Same Alert Is Reused #18

simongiesen opened this issue Aug 23, 2023 · 0 comments

Comments

@simongiesen
Copy link

I build my ArrayList for the hints texts every time new. Also, the alert object itself is created new every time.

Showing up the alert for the first time, it works. Next time, it doesn't. Can you help?

ArrayList<String> lineHintEN = new ArrayList<>();
                lineHintEN.add("Prename");
                lineHintEN.add("Surname");
                lineHintEN.add("Email");
                lineHintEN.add("Birthday");

CustomAlertDialogue.Builder alert = new CustomAlertDialogue.Builder(SampleActivity.this)
                            .setStyle(CustomAlertDialogue.Style.INPUT)
                            .setTitle(title)
                            .setMessage(message)
                            .setPositiveText(positiveText)
                            .setPositiveColor(R.color.positive)
                            .setPositiveTypeface(Typeface.DEFAULT_BOLD)
                            .setOnInputClicked(new CustomAlertDialogue.OnInputClicked() {
                                @Override
                                public void OnClick(View view, Dialog dialog, ArrayList<String> inputList) {
                                    for (String input : inputList) {
                                        Log.i("Input", input);
                                    }
                                    dialog.dismiss();
                                }
                            })
                            .setNegativeText(negativeText)
                            .setNegativeColor(R.color.negative)
                            .setOnNegativeClicked(new CustomAlertDialogue.OnNegativeClicked() {
                                @Override
                                public void OnClick(View view, Dialog dialog) {
                                    dialog.dismiss();
                                }
                            })
                            .setLineInputHint(lineHintEN)
                            .setLineInputText(lineText)
                            .setBoxInputHint(boxHint)
                            .setDecorView(getWindow().getDecorView())
                            .build();
                    alert.show();
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

1 participant