[Android] Hide keyboard on any action for mrl

Geoffrey Métais git at videolan.org
Tue Apr 5 14:52:22 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr  5 14:27:51 2016 +0200| [e5520bce90654a6ab108811b4dfbfb769f0ce996] | committer: Geoffrey Métais

Hide keyboard on any action for mrl

> https://code.videolan.org/videolan/vlc-android/commit/e5520bce90654a6ab108811b4dfbfb769f0ce996
---

 vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java       | 2 ++
 vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java b/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java
index a012493..ed24255 100644
--- a/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java
@@ -28,6 +28,7 @@ import android.widget.ImageView;
 import android.widget.TextView;
 
 import org.videolan.vlc.R;
+import org.videolan.vlc.gui.helpers.UiTools;
 import org.videolan.vlc.media.MediaDatabase;
 import org.videolan.vlc.media.MediaUtils;
 
@@ -65,6 +66,7 @@ public class MRLAdapter extends RecyclerView.Adapter<MRLAdapter.ViewHolder> {
         holder.uriTv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
+                UiTools.setKeyboardVisibility(holder.itemView, false);
                 MediaUtils.openStream(v.getContext(), uri);
             }
         });
diff --git a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
index 1966a93..fc05dc5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/network/MRLPanelFragment.java
@@ -37,6 +37,7 @@ import android.widget.TextView;
 
 import org.videolan.vlc.R;
 import org.videolan.vlc.gui.MainActivity;
+import org.videolan.vlc.gui.helpers.UiTools;
 import org.videolan.vlc.interfaces.IHistory;
 import org.videolan.vlc.media.MediaDatabase;
 import org.videolan.vlc.media.MediaUtils;
@@ -103,6 +104,7 @@ public class MRLPanelFragment extends Fragment implements IHistory, View.OnKeyLi
 
     private boolean processUri() {
         if (!TextUtils.isEmpty(mEditText.getEditText().getText().toString())){
+            UiTools.setKeyboardVisibility(mEditText, false);
             MediaUtils.openStream(getActivity(), mEditText.getEditText().getText().toString().trim());
             MediaDatabase.getInstance().addMrlhistoryItem(mEditText.getEditText().getText().toString().trim());
             updateHistory();



More information about the Android mailing list