Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Google Play Services Interacting with Your API Defining onBindViewHolder()

what is the symbol missing in listingHolder.titleView?

whats wrong with the code?

ListingsAdapter.java
// This is an excerpt from the full file.

public void onBindViewHolder(ListingHolder listingHolder, int position)

{ final Listing listing = listings.results[position];
  listingHolder.titleView.setText(listing.title);
}

2 Answers

Jon Kussmann
PLUS
Jon Kussmann
Courses Plus Student 7,254 Points

Hi Rahul,

This is a confusing one and took me a couple of minutes to figure it out.

My question was: Set the text of the holder.title TextView object to the title of the listing we just looked up. Hint: Use the title property from listing.

It is difficult to read the question, but the TextView is not called titleTextView... it is just called "title".

So in my case case it would be:

holder.title.setText(listing.title);

Try reading the question a little more closely. If you need more clarification, please copy and paste the question here and I'll help you out.

public void onBindViewHolder(ListingHolder holder, int position) { Listing listing = listings.results[position]; // Set this variable! holder.title.setText(listing.title); }