AlertDialog is not announcing the message in android

Viewed 91

When I turn on the Talkback feature in a Android device, when alert dialog is shown, it only announces only the Title and not the message. I am looking to also announce the Message (Do you want to delete ?) along with the Title (Delete). I am clueless on how this can be done.

 AlertDialog.Builder builder = new AlertDialog.Builder(context, 0);
                    builder.setTitle(R.string.dialog_title)
                            .setMessage(R.string.dialog_message)
                            .setPositiveButton(R.string.delete_text,
                                    new DialogInterface.OnClickListener() {
                                        @Override
                                        public void onClick(DialogInterface dialog, int which) {
                                              //op
                                        }
                                    })
                            .setNegativeButton(R.string.dialog_cancel_button_content_description,
                                    new DialogInterface.OnClickListener() {
                                        @Override
                                        public void onClick(DialogInterface dialog, int which) {
                                            // no op
                                        }
                                    })
                            .setCancelable(true);
                    AlertDialog dialog = builder.create();
                    dialog.show();

Strings.xml :

<string name="dialog_title" comment="delete button."><b>Delete</b></string>
<string name="dialog_message" comment="confirmation dialog of delete button.">Do you sure you want to delete?</string>
0 Answers
Related