android: Explicitly apply default theme to dialogs
When you don't specify a theme the platform defaults back to gingerbread
styling. By applying the device default theme it will change it to the
new (and much nicer looking) styles on newer devices.
close #18
diff --git a/src/android/Notification.java b/src/android/Notification.java
index 23312b4..456a9bf 100755
--- a/src/android/Notification.java
+++ b/src/android/Notification.java
@@ -151,7 +151,7 @@
Runnable runnable = new Runnable() {
public void run() {
- AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity());
+ AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
dlg.setMessage(message);
dlg.setTitle(title);
dlg.setCancelable(true);
@@ -192,7 +192,7 @@
Runnable runnable = new Runnable() {
public void run() {
- AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity());
+ AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
dlg.setMessage(message);
dlg.setTitle(title);
dlg.setCancelable(true);
@@ -270,7 +270,7 @@
public void run() {
final EditText promptInput = new EditText(cordova.getActivity());
promptInput.setHint(defaultText);
- AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity());
+ AlertDialog.Builder dlg = new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
dlg.setMessage(message);
dlg.setTitle(title);
dlg.setCancelable(true);
@@ -398,7 +398,7 @@
final CordovaInterface cordova = this.cordova;
Runnable runnable = new Runnable() {
public void run() {
- notification.progressDialog = new ProgressDialog(cordova.getActivity());
+ notification.progressDialog = new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
notification.progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
notification.progressDialog.setTitle(title);
notification.progressDialog.setMessage(message);