[Android] Revert grouped videos title ellipsize

Geoffrey Métais git at videolan.org
Tue Jan 16 17:45:25 CET 2018


vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan  4 10:05:14 2018 +0100| [b6d0e47180a1504edf49385fbc2e1847264b5f75] | committer: Geoffrey Métais

Revert grouped videos title ellipsize

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

 .../src/org/videolan/vlc/gui/video/VideoGridFragment.java      |  2 +-
 .../src/org/videolan/vlc/gui/video/VideoListAdapter.java       | 10 +---------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 49e412ed5..e7b9269e9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -92,7 +92,7 @@ public class VideoGridFragment extends SortableFragment<VideoListAdapter> implem
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        mAdapter = new VideoListAdapter(this, mGroup != null);
+        mAdapter = new VideoListAdapter(this);
 
         if (savedInstanceState != null)
             setGroup(savedInstanceState.getString(KEY_GROUP));
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
index 1aef38e1e..2f5863fcf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -35,7 +35,6 @@ import android.view.ViewGroup;
 import android.widget.Filter;
 import android.widget.Filterable;
 import android.widget.ImageView;
-import android.widget.TextView;
 
 import org.videolan.libvlc.util.AndroidUtil;
 import org.videolan.medialibrary.Tools;
@@ -54,7 +53,6 @@ import org.videolan.vlc.util.MediaItemFilter;
 import org.videolan.vlc.util.MediaLibraryItemComparator;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -73,15 +71,13 @@ public class VideoListAdapter extends SortableAdapter<MediaWrapper, VideoListAda
     private final ItemFilter mFilter = new ItemFilter();
     private int mSelectionCount = 0;
     private int mGridCardWidth = 0;
-    final boolean mGroup;
 
     private boolean mIsSeenMediaMarkerVisible = true;
 
-    VideoListAdapter(IEventsHandler eventsHandler, boolean group) {
+    VideoListAdapter(IEventsHandler eventsHandler) {
         super();
         mEventsHandler = eventsHandler;
         mIsSeenMediaMarkerVisible = PreferenceManager.getDefaultSharedPreferences(VLCApplication.getAppContext()).getBoolean("media_seen", true);
-        mGroup = group;
     }
 
     @Override
@@ -94,10 +90,6 @@ public class VideoListAdapter extends SortableAdapter<MediaWrapper, VideoListAda
             params.height = params.width*10/16;
             binding.getRoot().setLayoutParams(params);
         }
-        final TextView titleView = binding.getRoot().findViewById(R.id.ml_item_title);
-        titleView.setEllipsize(mGroup ? TextUtils.TruncateAt.START : null);
-        titleView.setSingleLine(mGroup);
-        titleView.setMaxLines(mGroup ? 1 : 2);
         return new ViewHolder(binding);
     }
 



More information about the Android mailing list