Kodeco Forums

Android GridView Tutorial

These days, people are always being told to relax, go off-grid and put their smartphones down. But where’s the fun in that? I’m here to encourage you not to get off the grid. Instead, get onto our grid—our Android GridView tutorial, that is! Today you’ll learn how to tame this widely-used Android component and construct […]


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/995-android-gridview-tutorial
1 Like

very Good Grid View tutorial! thanks

Really good tutorial.
Just one thing :
your ViewHolder class

private class ViewHolder {
private final TextView nameTextView;
private final TextView authorTextView;
private final ImageView imageViewCoverArt;
private final ImageView imageViewFavorite;

and then references call :

viewHolder.imageViewCoverArt.setImageResource(book.getImageResource());
viewHolder.nameTextView.setText(mContext.getString(book.getName()));
viewHolder.authorTextView.setText(mContext.getString(book.getAuthor()));
viewHolder.imageViewFavorite.setImageResource(book.getIsFavorite() ? R.drawable.star_enabled : R.drawable.star_disabled);

Does it works ? :stuck_out_tongue:

Well great work, really nice tips, thank you !

Great tutorial! Explained very clearly, especially the logic for every step. As an iOS Developer, this is really one of the best explained tutorials I 've ever seen!

This tutorial is more than six months old, so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]