How would I go about inserting this code into a ListView in android?
List<YouTubeVideo> videos = ym.retrieveVideos(textQuery, maxResults, filter, timeout);
for (YouTubeVideo youtubeVideo : videos) {
System.out.println(youtubeVideo.getWebPlayerUrl());
System.out.println("Thumbnails");
for (String thumbnail : youtubeVideo.getThumbnails()) {
System.out.println("\t" + thumbnail);
}
System.out.println(youtubeVideo.getEmbeddedWebPlayerUrl());
System.out.println("************************************"); }
}
}
Would I create a custom adapter and use getView()? If so how would it look?
Yes, I would create a custom adapter and use getView(). Here is some sample code for a row layout with a TextView and an ImageView: