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 Build a Weather App (2015) Hooking Up the Model to the View Plugging in the Data

I still don't understand what I am doing with ButterKnife and okhttp

Soon I'm going to finish this practise Weather app But to be honest I don't understand what ButterKnife doing also okhttp Can someone explain me simple what these two are doing and why we are using it for??

Thank you :pray:

Sexual Potatoes
Sexual Potatoes
12,051 Points

The OKHTTP explanation is really superficial and doesn't help much with beginners. Treehouse just throws these concepts at you and never gets in depth enough for users to understand what's happening. I had to go to external sources to make sense of it.

2 Answers

okhttp is being used simply to request the weather data from the forecast.io servers ButterKnife as far as I can understand is being used this far just to set the member variables inside the mainActivity class and not having to initialize those member variables inside the Oncreate method one per one using
mTimeLabel = (TextView) findViewById(R.id.timeLabel), but instead use ButterKnife.bind(this); so that we have all the member variables from the layout initialized in one line,

Let me know if I'm wrong because this is my first time using these libraries

Marco absolutely