RecyclerViews at work

To show the list of weather stations I decided to use two RecyclerViews, one to scroll the list vertically and inside that many horizontal RecyclerViews. The idea behind it is that when I include more weather stations in the future, these stations will provide more data.

This is the code for the StationsAdapter:

Inside the StationsAdapter the MeasurementsAdapter is called. Whats really important here is to tell RecyclerView that data has changed. Its not really great for performance but if this is not done, the wrong data will appear for the stations further down the list.

In line 89 I “repack” the data from the ArrayList containing measurements data into simpler variables. I did this when I was searching for bugs. This could be fixed at a later time to make things easier.