title: Listing YouTube Videos in RecyclerView
body: <p>When trying to list 10 videos of a youtube playlist in an Android activity in RecylerView. I don't get errors but I get that only last video is playable! 
  the other videos are not loaded.</p>
  
  <p><a href="https://i.stack.imgur.com/i5MkQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i5MkQ.png" alt="enter image description here"></a></p>
  
  <p>I use the YouTubePlayerView, as in the following code snippets,</p>
  
  <pre><code>public class PlaylistViewAdapter extends RecyclerView.Adapter {
      PlaylistItem[] playlist;
      String APIKey;
  
      public PlaylistViewAdapter(PlaylistItem[] c, String APIKey) {
  
          playlist = c;
          this.APIKey = APIKey;
      }
  
  
      class PlaylistItemData extends RecyclerView.ViewHolder {
  
          TextView title;
          TextView desc;
          YouTubePlayerView videoPlayer;
  
          public PlaylistItemData(View itemView) {
              super(itemView);
              title = (TextView) itemView.findViewById(R.id.title);
              desc = (TextView) itemView.findViewById(R.id.desc);
              videoPlayer = (YouTubePlayerView) itemView.findViewById(R.id.youtube_player_view);
  
  
          }
      }
  
  
      @Override
      public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view = LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.playlist_row, parent, false);
  
          PlaylistItemData dataObjectHolder = new PlaylistItemData(view);
          return dataObjectHolder;
      }
  
      @Override
      public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int position) {
  
          ((PlaylistItemData) holder).videoPlayer.initialize(APIKey, new YouTubePlayer.OnInitializedListener() {
              @Override
              public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {
           //       if (!b) {
                      youTubePlayer.cueVideo(playlist[position].getVideoId());
         //         }
              }
  
              @Override
              public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
                  Log.i("onBindView", youTubeInitializationResult.toString());
              }
          });
          ((PlaylistItemData) holder).title.setText(playlist[position].getTitle());
          ((PlaylistItemData) holder).desc.setText(playlist[position].getDesc());
  
      }
  
  
      @Override
      public int getItemCount() {
  
          return playlist.length;
      }
  }
  </code></pre>
  
  <p>I found this answer <a href="https://stackoverflow.com/a/36474697/1247399">https://stackoverflow.com/a/36474697/1247399</a> so should I have to use thumbnails or webview ? </p>