private void populateScreenShotsView(){
  ArrayList<IMediaObject> mediaObjects=new ArrayList<>();
  if (videos != null) {
    for (    GetAppMeta.Media.Video video : videos) {
      mediaObjects.add(new Video(video.thumbnail,video.url));
    }
  }
  if (screenshots != null) {
    for (    GetAppMeta.Media.Screenshot screenshot : screenshots) {
      mediaObjects.add(new Screenshot(screenshot.url,screenshot.getOrientation()));
    }
  }
  ScreenshotsAdapter adapter=new ScreenshotsAdapter(glide,mediaObjects);
  mScreenshotsList.addItemDecoration(new DividerItemDecoration(AptoideUtils.getPixels(getActivity(),5)));
  mScreenshotsList.setLayoutManager(new LinearLayoutManager(getActivity(),LinearLayoutManager.HORIZONTAL,false));
  mScreenshotsList.setNestedScrollingEnabled(false);
  mScreenshotsList.setAdapter(adapter);
  if (mediaObjects.isEmpty()) {
    mScreenshotsList.setVisibility(View.GONE);
  }
}

private void populateScreenShotsView ( ) { ArrayList < IMediaObject > mediaObjects = new ArrayList < > ( ) ; if ( videos != null ) { for ( GetAppMeta . Media . Video video : videos ) { mediaObjects . add ( new Video ( video . thumbnail , video . url ) ) ; } } if ( screenshots != null ) { for ( GetAppMeta . Media . Screenshot screenshot : screenshots ) { mediaObjects . add ( new Screenshot ( screenshot . url , screenshot . getOrientation ( ) ) ) ; } } ScreenshotsAdapter adapter = new ScreenshotsAdapter ( glide , mediaObjects ) ; mScreenshotsList . addItemDecoration ( new DividerItemDecoration ( AptoideUtils . getPixels ( getActivity ( ) , 5 ) ) ) ; mScreenshotsList . setLayoutManager ( new LinearLayoutManager ( getActivity ( ) , LinearLayoutManager . HORIZONTAL , false ) ) ; mScreenshotsList . setNestedScrollingEnabled ( false ) ; mScreenshotsList . setAdapter ( adapter ) ; if ( mediaObjects . isEmpty ( ) ) { mScreenshotsList . setVisibility ( View . GONE ) ; } }
will create the views that show images and video screenshots .
