1

I am working for Android Wearable devices, I want to show an confirmation Dialog, Currently i am using AcceptDenyDialog, AcceptDenyDialog perfectly working in After API 23, But oneActionDialog.get().show Showing the warning i.e Call requires API Level 24.
How to Show AcceptDenyDialog in API 23 , is there alternative ?
Any advice or guidance would be greatly appreciated.
Thanks in Advance.

Supplier<Dialog> oneActionDialog = new Supplier<Dialog>() {
        @Override
        public Dialog get() {
            AcceptDenyDialog oneActionDialog =
                    new AcceptDenyDialog(WearBaseActivity.this);
            oneActionDialog.setTitle("title");
            oneActionDialog.setMessage("message");
            oneActionDialog.setPositiveButton(new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    // Add code here for onClick functionality.
                }
            });
            return oneActionDialog;
        }
    };
oneActionDialog.get().show();
scienticious
  • 438
  • 1
  • 7
  • 22

0 Answers0