You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mr...@apache.org on 2014/09/15 22:00:30 UTC

git commit: Set dialog text dir to locale

Repository: cordova-plugin-dialogs
Updated Branches:
  refs/heads/master 24c2665b8 -> c88acd6ae


Set dialog text dir to locale


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/c88acd6a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/tree/c88acd6a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/diff/c88acd6a

Branch: refs/heads/master
Commit: c88acd6ae9b4533d76605ee4876bf914ccd252e0
Parents: 24c2665
Author: mbillau <mi...@gmail.com>
Authored: Tue Sep 9 09:20:33 2014 -0400
Committer: mbillau <mi...@gmail.com>
Committed: Tue Sep 9 09:20:33 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs/blob/c88acd6a/src/android/Notification.java
----------------------------------------------------------------------
diff --git a/src/android/Notification.java b/src/android/Notification.java
index 456a9bf..2ca5156 100755
--- a/src/android/Notification.java
+++ b/src/android/Notification.java
@@ -32,6 +32,8 @@ import android.media.Ringtone;
 import android.media.RingtoneManager;
 import android.net.Uri;
 import android.widget.EditText;
+import android.widget.TextView;
+
 
 /**
  * This class provides access to notifications on the device.
@@ -171,7 +173,9 @@ public class Notification extends CordovaPlugin {
                 });
 
                 dlg.create();
-                dlg.show();
+                AlertDialog dialog =  dlg.show();
+                TextView messageview = (TextView)dialog.findViewById(android.R.id.message);
+                messageview.setTextDirection(android.view.View.TEXT_DIRECTION_LOCALE);
             };
         };
         this.cordova.getActivity().runOnUiThread(runnable);
@@ -244,7 +248,9 @@ public class Notification extends CordovaPlugin {
                 });
 
                 dlg.create();
-                dlg.show();
+                AlertDialog dialog =  dlg.show();
+                TextView messageview = (TextView)dialog.findViewById(android.R.id.message);
+                messageview.setTextDirection(android.view.View.TEXT_DIRECTION_LOCALE);
             };
         };
         this.cordova.getActivity().runOnUiThread(runnable);
@@ -341,8 +347,9 @@ public class Notification extends CordovaPlugin {
                 });
 
                 dlg.create();
-                dlg.show();
-
+                AlertDialog dialog =  dlg.show();
+                TextView messageview = (TextView)dialog.findViewById(android.R.id.message);
+                messageview.setTextDirection(android.view.View.TEXT_DIRECTION_LOCALE);
             };
         };
         this.cordova.getActivity().runOnUiThread(runnable);