cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: android: Explicitly apply default theme to dialogs
Date Fri, 27 Jun 2014 18:13:58 GMT
Repository: cordova-plugin-dialogs
Updated Branches:
  refs/heads/master bb17d7d1b -> 90ad94c33


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


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/commit/90ad94c3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/90ad94c3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/90ad94c3

Branch: refs/heads/master
Commit: 90ad94c3309619b9e629ccf416d1a787df7c3d0e
Parents: bb17d7d
Author: Christiaan Rakowski <cs.rakowski@gmail.com>
Authored: Thu Mar 27 10:39:03 2014 +0100
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Fri Jun 27 14:13:08 2014 -0400

----------------------------------------------------------------------
 src/android/Notification.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/90ad94c3/src/android/Notification.java
----------------------------------------------------------------------
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 @@ public class Notification extends CordovaPlugin {
         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 @@ public class Notification extends CordovaPlugin {
 
         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 class Notification extends CordovaPlugin {
             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 @@ public class Notification extends CordovaPlugin {
         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);


Mime
View raw message