I added an ArrayAdapter implementation class, which helps the ACTV display only exhibits, and all exhibits where any tag has a substring match with the query
To facilitate the adapter, I added a simple Exhibit class modeled off of ZooData.VertexInfo, since that class is static and can't be used in extending ArrayAdapter
I added functionality to the DataFileReader class to simplify loading graph objects into activities.
I also refactored main to be more simple, using that class.
I removed some redundant update calls, so the listener is simpler
Notably, I removed databasing by ViewModel in MainActivity (although LocationsListActivity still uses ViewModel for its list). The rationale is that MainActivity does not need to display db contents, so it should not call the database view model. I insert items directly using the DAO in the listener.
In addition, I removed the problematic method loadJSON in LocationsListItem, as it was unnecessary for our use case for the database. We do not need to insert all locations into the database on app start.
I also removed the lambda call to loadJSON in the createDatabase method. This change removes the demo bug we encountered on Monday.
Lastly, I made it so that LocationsListActivity calls a gate-finder method to set starting vertex for routing. This is to future proof, in case we need to route using user location or custom starting location.
I attached appropriate documentation in the new classes. If anyone needs info on how the ArrayAdapter works:
Oh boy, I added a lot today: Search by tags:
I added functionality to the DataFileReader class to simplify loading graph objects into activities. I also refactored main to be more simple, using that class.
Notably, I removed databasing by ViewModel in MainActivity (although LocationsListActivity still uses ViewModel for its list). The rationale is that MainActivity does not need to display db contents, so it should not call the database view model. I insert items directly using the DAO in the listener.
Lastly, I made it so that LocationsListActivity calls a gate-finder method to set starting vertex for routing. This is to future proof, in case we need to route using user location or custom starting location.
I attached appropriate documentation in the new classes. If anyone needs info on how the ArrayAdapter works: