In the manifest, I used the following line:
android:theme="@android:style/Theme.Light.NoTitleBar"
do not have a title and display the light version of AlertDialog in my application, as in the example: 
But it appears in a dark topic:

My Java code is:
new AlertDialog.Builder(FreeDraw.this) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle("Clear Drawing?") .setMessage("Do you want to clear the drawing board?") .setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { finish(); startActivity(getIntent()); } }) .setNegativeButton("No", null) .show();
How to save theme highlighting for AlertDialog?
java android android-alertdialog
Si8
source share