[Android] Set the input type for the OpenMRL dialog input field

Martin Storsjö git at videolan.org
Tue Jul 30 10:21:18 CEST 2013


vlc-ports/android | branch: 0.1.x-bugfix | Martin Storsjö <martin at martin.st> | Mon Jul 29 17:54:27 2013 +0300| [1da43e153bf73054fe899aa7918c5d46279a001c] | committer: Jean-Baptiste Kempf

Set the input type for the OpenMRL dialog input field

This avoids autocorrection and similar things that aren't useful
(and mostly very annoying) when typing a URL.

Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit f8b6d2b7d82cdb0f987153be5b7a5869436a1951)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=1da43e153bf73054fe899aa7918c5d46279a001c
---

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 4a92c11..76ace54 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -55,6 +55,7 @@ import android.preference.PreferenceManager;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
+import android.text.InputType;
 import android.util.Log;
 import android.view.Display;
 import android.view.LayoutInflater;
@@ -642,6 +643,7 @@ public class MainActivity extends SherlockFragmentActivity {
     private void onOpenMRL() {
         AlertDialog.Builder b = new AlertDialog.Builder(this);
         final EditText input = new EditText(this);
+        input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_NORMAL);
         b.setTitle(R.string.open_mrl_dialog_title);
         b.setMessage(R.string.open_mrl_dialog_msg);
         b.setView(input);



More information about the Android mailing list