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

How to change ACTIONSHEET's backgroud color and text color? #13

Open
cemalsayin opened this issue Aug 27, 2020 · 0 comments
Open

How to change ACTIONSHEET's backgroud color and text color? #13

cemalsayin opened this issue Aug 27, 2020 · 0 comments

Comments

@cemalsayin
Copy link

Hi, i set a CustomAlertDialogue.Style.ACTIONSHEET, i want to change backgroud and items title color but i can't do it. ".setBackgroundColor(R.color.negative)" now working.

ArrayList<String> other = new ArrayList<String>();
                other.add("1199,99 TL / yıl");
                other.add("99,99 TL / yıl");

                final CustomAlertDialogue.Builder alert = new CustomAlertDialogue.Builder(getContext())
                        .setStyle(CustomAlertDialogue.Style.ACTIONSHEET)
                        .setTitle("Lütfen Bir Ödeme Planı seçin")
                        .setCancelText("Vazgeç")
                        .setBackgroundColor(R.color.colRed)
                        .setNegativeColor(R.color.colRed)
                        .setOnCancelClicked(new CustomAlertDialogue.OnCancelClicked() {
                            @Override
                            public void OnClick(View view, Dialog dialog) {
                                dialog.dismiss();
                            }
                        })
                        .setOthers(other)
                        .setOnItemClickListener(new AdapterView.OnItemClickListener() {
                            @Override
                            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                                String selection = adapterView.getItemAtPosition(i).toString();
                                switch (selection)
                                {
                                    case "1199,99 TL / yıl":

                                        break;
                                    case "99,99 TL / yıl":

                                        break;
                                }
                            }
                        })
                        .setDecorView(getActivity().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