[Android] Decode streams title & url for display
Geoffrey Métais
git at videolan.org
Tue Sep 5 17:20:54 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Sep 5 14:41:25 2017 +0200| [d220f5f87c3b21c6fd55639dd89a369b4ab38216] | committer: Geoffrey Métais
Decode streams title & url for display
> https://code.videolan.org/videolan/vlc-android/commit/d220f5f87c3b21c6fd55639dd89a369b4ab38216
---
vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
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 99264a200..ad57071f2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/network/MRLAdapter.java
@@ -20,6 +20,7 @@
*****************************************************************************/
package org.videolan.vlc.gui.network;
+import android.net.Uri;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
@@ -39,12 +40,12 @@ class MRLAdapter extends RecyclerView.Adapter<MRLAdapter.ViewHolder> {
}
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
- TextView uriTv, titleTv;
+ final TextView uriTv, titleTv;
public ViewHolder(View v) {
super(v);
- uriTv = (TextView) v.findViewById(R.id.mrl_item_uri);
- titleTv = (TextView) v.findViewById(R.id.mrl_item_title);
+ uriTv = v.findViewById(R.id.mrl_item_uri);
+ titleTv = v.findViewById(R.id.mrl_item_title);
itemView.setOnClickListener(this);
}
@@ -69,8 +70,8 @@ class MRLAdapter extends RecyclerView.Adapter<MRLAdapter.ViewHolder> {
@Override
public void onBindViewHolder(final ViewHolder holder, int position) {
final HistoryItem item = mDataset[position];
- holder.uriTv.setText(item.getMrl());
- holder.titleTv.setText(item.getTitle());
+ holder.uriTv.setText(Uri.decode(item.getMrl()));
+ holder.titleTv.setText(Uri.decode(item.getTitle()));
}
public void setList(HistoryItem[] list){
More information about the Android
mailing list