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

Nancy Melucci
PLUS
Nancy Melucci
Courses Plus Student 35,157 Points

Android Lists and Adapters: Weather App Runs, list does not show data

java

    @OnClick (R.id.dailyButton)
    public void startDailyActivity(View view) {
        Intent intent = new Intent(this, DailyForecastActivity.class);
        intent.putExtra(DAILY_FORECAST, mForecast.getDailyForecast());
        startActivity(intent);
    }

}

I get the feeling that the above code is the crux of the problem OR is pointing the way to it. I am in stage 4 and after troubleshooting some issues with getters and setters, the app runs but the list view is still showing no data.

getTimeZone and getSummary are "never used" but I can't figure out how to make them "used"

Happy to post any other code. I am feeling good after figuring out the big error that was making the app crash out but I'd like to fix this too.

Happy New Year.

Nancy M.

Nancy Melucci
Nancy Melucci
Courses Plus Student 35,157 Points

My Hourly Forecast works fine...maybe I should just rework the DayAdapter into a recycler view? Studio 1.5 wants me to do that anyway...

???

Nancy Melucci
Nancy Melucci
Courses Plus Student 35,157 Points

I recast the ListView of DailyForecastActivity and DayAdapter using RecyclerView by (essentially) hacking the code for the HourAdapter and the HourlyForecastActivity.

Now the app works for showing the data, with two small problems 1) I can't get the Summary to be recognized and show. NullPointerException. I had to remove it. 2) The layout looks like crap unless I remove the degree imageview.

I worked on both of these issue for about an hour. I don't know if anyone can help me. I am proud that I at least made the Daily Forecast work and it can be understood if you don't mind the lack of a degree sign.

NJM