Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

ListFragment OnListItemClick not being called for EditFriendsActivity - Ribbit App

Hello all,

For some reason nothing happens when I click on any of the rows of friends in the EditFriendsActivity. It works when I tab and hit enter in the emulator but this activity is unresponsive when I click. Is there something I need to do in one of the xml layout files? If anyone could offer suggestions that would point me in the right direction it would be appreciated. I've got through the videos multiple times and can't seem to find out where my code deviates from that of Ben's.

1 Answer

In case anyone else comes across this problem I had to make a change in my fragment_edit_friends.xml layout where android:layout_width and android:layout_height needed to both be "wrap_content" instead of "match_parent". Otherwise the device would only respond if I clicked in the area defined by the following line: android:layout_marginLeft="16dp".