[Android] Revert grouped videos title ellipsize

Geoffrey Métais git at videolan.org
Thu Jan 4 17:08:03 CET 2018


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

Revert grouped videos title ellipsize

(cherry picked from commit b6d0e47180a1504edf49385fbc2e1847264b5f75)

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

 .../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 49e36cdb2..7462cac00 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -95,7 +95,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 ad07f0c0f..e3834106a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -36,7 +36,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