the-blue-alliance / the-blue-alliance-android

An Android app for accessing information about the FIRST Robotics Competition.
MIT License
76 stars 34 forks source link

Migrate team list to ViewPager2 #929

Closed bherbst closed 4 years ago

bherbst commented 4 years ago

Summary: ViewPager2 has been released! ViewPager2 is a re-write of ViewPager that now leverages RecyclerView to manage its pages.

This means that updating the number of pages and the content in the tabs is much easier, and we can resolve #706 .

This PR moves only the team list to ViewPager2. Future PRs will move other screens. The initial work involved was twofold: First, pulling in ViewPager2 and doing the work of replacing the existing ViewPager, and second matching the styling of the new tab strip to the old one.

Issues Reference:

706 - Dynamic tab strips

Test Plan: Manually tested on a variety of devices. I also manually overrode our data loading to simulate loading additional/fewer teams to verify that the tabs and their contents updated appropriately. Seems to be working!

Screenshots: Here's a screenshot to prove that the new tabs look the same as they did before! teams_new

phil-lopreiato commented 4 years ago

Merged manually (I fixed the conflicts), thanks for doing this - I'm glad we'll be able to unblock more custom viewpagers :)