It's simple for API 11 onwards:
AlertDialog.Builder alert = new AlertDialog.Builder(context, AlertDialog.THEME_DEVICE_DEFAULT_DARK);
The field THEME_DEVICE_DEFAULT_DARK
was added in API 14 so if you are targeting before then, just use the numeric value, thus:
AlertDialog.Builder alert = new AlertDialog.Builder(context, 4);
The different constants you can use, and their values are shown here. On pre API 14 you will still get the white alert though.
----------------------------------------------------------------UPDATE--------------------------------------------------------
AlertDialog.THEME_DEVICE_DEFAULT_DARK
is depreciated,
Below is the updated code:
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this, android.R.style.Theme_DeviceDefault_Light_Dialog_Alert);
You can choose different themes instead of this android.R.style.Theme_DeviceDefault_Light_Dialog_Alert