CustomAlertViewDialogue icon indicating copy to clipboard operation
CustomAlertViewDialogue copied to clipboard

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

Open cemalsayin opened this issue 4 years ago • 0 comments

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();

cemalsayin avatar Aug 27 '20 10:08 cemalsayin