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 Android Lists and Adapters (2015) Custom ListViews Creating a Custom List Adapter

William Juste
William Juste
7,822 Points

From a 'getView()' method.Fill in the blanks to get the book for the given position and set the title using 'getTitle()'

Does anyone know how to answer this? You have to fill in the blank

public View getView(int position, View convertView, ViewGroup parent) {
    // some code omitted
    Book book = mBooks[___________________];
    holder.titleTextView.setText(_________________);
}

2 Answers

Khaled Beddakhe
Khaled Beddakhe
13,960 Points

mBooks is an array of objects so you can get one specific book using its index [position] once you get your book object you can call book.getTitle() method

if you still can't answer this quiz you have to revise your java course first. Good luck

f**** u khalid f**** stubid tfoooo 3labou mak dayr fiha m3alam