Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Kevin Grifo9,824 Points
Where does the setWeather method come from?
When binding the currentWeather object Ken uses the statement
I was just curious as to where the setWeather method/function is located. What class? I remember Ken stating that a class is automatically generated when enabling and using Java binding called ActivityMainBinding. Is there where this particular method is located? Any help or clarification would truly be appreciated.
in the first video, where we were creating the edits to the activity_main.xml file, we made this tag:
<variable name = "weather" type = "com.example.stormy.CurrentWeather"/>
the library generates the needed method calls. We told it to call it "setWeather" when we chose that name to be weather in that xml file.