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 trialPedro Guimaraes
2,671 PointsCustom List Adapter Bug
Hi, I am currently on this part of "Building the Ribbit app" http://teamtreehouse.com/library/build-a-selfdestructing-message-android-app/retrieving-and-viewing-messages/creating-a-custom-list-adapter-for-messages
And there is a bug with the ListAdapter, I've already reviewed my files and they match with Ben's files. If you scroll down on the list and then up the app will crash (happened both on emulator and on my phone)
https://www.youtube.com/watch?v=M6Hu8uiPSdA
It happens every single time
2 Answers
Ben Jakuben
Treehouse TeacherSorry about this! We fix it in the next video, but I forgot to add the last line below in this video:
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.message_item, null);
holder = new ViewHolder();
holder.iconImageView = (ImageView)convertView.findViewById(R.id.messageIcon);
holder.nameLabel = (TextView)convertView.findViewById(R.id.senderLabel);
convertView.setTag(holder);
}
rtrind
6,358 PointsJust had to compare this on the Stormy app to find out how the hell the project was working on the video, it didn't make sense, lol.
Joseph Marcus
11,069 PointsJoseph Marcus
11,069 PointsLol. Was facing the same issue. Had to check stack overflow to fix it. Please update ASAP. Thank you! :D