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
Bob Boursaw
2,047 PointsLists and adapters : retrieving parcelable data
I am working through the Android track and am working through the section on getting information between activities using a parcelable array.
Prior to starting this section, my app was working perfectly. At the start, I was able to click the 7 day button on the main activity page and it woudl display the list view with the 7 static place holders we had in (Monday - Sunday).
In this section, the goal was to get the 7 day forecast information in to the list. I have followed the steps through the first 2 videos and do not have any errors when launching the app. However, when I click the 7 day button, I get the message "No data to display" which was something we added in to this application that presents to the user when there is no data.
I have spent some time trying to debug this and determine what the issue is but have been unable to find my error up to this point. The main issue is that I'm struggling a bit to keep all of this straight and which piece connects to where, so determining where I should even look has been the first battle.
I set break points at the following section of code and each member variable did show the expected values as I stepped through each line. One thing that seemed off to me is that it only stepped through the section with dest. and never seemed to make it to the section which uses the in.readString, etc.
My apologies for not having a specific error to look at, but I'm simply not getting data from the array in to the parcelable stuff and am struggling to determine where i look to track this down so I can find my mistake.
Any assistance would be greatly appreciated.
1 Answer
Minh Duc Nguyen
8,522 PointsMake sure your getDailyForecast() function in MainActivity returns the days array