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

Martin Storsjö git at videolan.org
Mon Jul 29 16:55:46 CEST 2013


vlc-ports/android | branch: master | Martin Storsjö <martin at martin.st> | Mon Jul 29 17:54:27 2013 +0300| [f8b6d2b7d82cdb0f987153be5b7a5869436a1951] | committer: Martin Storsjö

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>

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

 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