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 trialaroshinemunasinghe
5,649 PointsI 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
2 Answers
Marco Fregoso
Courses Plus Student 193 Pointsokhttp 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
Akashdeep Singh
1,249 PointsMarco absolutely
Sexual Potatoes
12,051 PointsSexual Potatoes
12,051 PointsThe 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.