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.
Evan Cornish3,360 Points
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.