title: VideoView isn't showing in ListView
body: <p>I'm making a ListView of videos, so I decided to use video view. I know it's encouraged to use TextureViews to display the videos rather than VideoView, but I think VideoView should work fine for me. The problem is my videos aren't showing up. I know my video paths are fine because if I hardcode the file paths into a videoview <em>outside</em> of the listview then it shows up just fine. Also, if I add the video paths to textviews instead of videoviews in the listview then it displays them just fine. The problem is solely with videoviews. Any help would be appreciated.</p>
  
  <pre><code>public class VideoListFragment extends Fragment {
  
      private Activity currentActivity;
      private long projectId;
      VideoAdapter videoAdapter;
      List&lt;String&gt; videoPathList;
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
          View rootView = inflater.inflate(R.layout.video_list, container, false);
  
          currentActivity = getActivity();
          projectId = ((Project)currentActivity).projectId;
  
          List&lt;String&gt; newList = new ArrayList&lt;String&gt;();
  
          ListView videoList = (ListView) rootView.findViewById(R.id.videoList);
          File directory = new File(getContext().getExternalFilesDir(null) + File.separator + projectId + File.separator);
          File[] dirContentsList = directory.listFiles(new FilenameFilter() {
              @Override
              public boolean accept(File dir, String filename) {
                  return filename.endsWith(".mp4");
              }
          });
  
          Pair[] pairs = new Pair[dirContentsList.length];
          for (int i = 0; i &lt; dirContentsList.length; i++)
              pairs[i] = new Pair(dirContentsList[i]);
  
          // Sort them by timestamp.
          Arrays.sort(pairs);
  
          // Take the sorted pairs and extract only the file part, discarding the timestamp.
          for (int i = 0; i &lt; dirContentsList.length; i++)
              newList.add(pairs[i].filePath);
  
          videoPathList = new ArrayList(Arrays.asList(Arrays.toString(dirContentsList).split(",")));
          videoAdapter = new VideoAdapter(getContext(), R.layout.video_list, newList);
          videoList.setAdapter(videoAdapter);
          videoAdapter.addAll(newList);
          videoAdapter.notifyDataSetChanged();
  
          return rootView;
      }
  
      private class VideoAdapter extends ArrayAdapter&lt;String&gt; {
  
          public VideoAdapter(Context context, int resource, List&lt;String&gt; videos) {
              super(context, resource, videos);
          }
  
          @Override
          public View getView(int position, View convertView, ViewGroup parent) {
              ViewHolder holder;
              if  (convertView == null) {
                  holder = new ViewHolder();
                  LayoutInflater mInflater = LayoutInflater.from(getContext());
                  convertView = mInflater.inflate(R.layout.video_row, null);
                  holder.videoView = (VideoView) convertView.findViewById(R.id.videoView);
                  convertView.setTag(holder);
              } else {
                  holder = (ViewHolder) convertView.getTag();
              }
  
              String videoPath = getItem(position);
              holder.videoView.setVideoPath(videoPath);
              return convertView;
          }
      }
  
      public static class ViewHolder {
          public VideoView videoView;
      }
  
      class Pair implements Comparable {
          public long t;
          public File f;
          public String filePath;
  
          public Pair(File file) {
              f = file;
              t = file.lastModified();
              filePath = file.getPath();
          }
  
          public int compareTo(Object o) {
              long u = ((Pair) o).t;
              return t &lt; u ? -1 : t == u ? 0 : 1;
          }
      };
  }
  </code></pre>
  
  <p>video_list.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/white"&gt;
  
      &lt;ListView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/videoList"
          /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>video_row.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;VideoView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/videoView"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_marginEnd="65dp"
      android:layout_marginRight="65dp"
      android:layout_marginLeft="65dp"
      android:layout_marginStart="65dp"
      android:layout_marginTop="25dp"/&gt;
  </code></pre>
  
  <p>View Tree </p>
  
  <pre><code>android.widget.RelativeLayout{d0fdaf6 V.E..... ... -1440,0-0,2463}
                        android.widget.ListView{c76c3fb VFED.VC. F.. 0,0-1440,28 #7f0c009b app:id/videoList}
                          android.widget.VideoView{d6a1c18 VFE..... ... 0,0-1440,0 #7f0c0099 app:id/videoView}
                          android.widget.VideoView{d4d7671 VFE..... ... 0,4-1440,4 #7f0c0099 app:id/videoView}
                          android.widget.VideoView{780c56 VFE..... ... 0,8-1440,8 #7f0c0099 app:id/videoView}
                          android.widget.VideoView{763a4d7 VFE..... ... 0,12-1440,12 #7f0c0099 app:id/videoView}
                          android.widget.VideoView{6f0e1c4 VFE..... ... 0,16-1440,16 #7f0c0099 app:id/videoView}
                          android.widget.VideoView{af208ad VFE..... ... 0,20-1440,20 #7f0c0099 app:id/videoView}
                          android.widget.VideoView{a8097e2 VFE..... ... 0,24-1440,24 #7f0c0099 app:id/videoView}
  </code></pre>