Wednesday, March 9, 2016

Using the Master/Detail template in ViewPager Fragments (download link)

Working code: http://ift.tt/1QDgrfJ

Android Master/Detail Flow template: http://ift.tt/1RSgUuA

Description: Using the Master/Detail Flow template available in Android Studio, my application utilizes a ViewPager to manage three Parent fragments. The third fragment is a Master (list), which has a Child (detail) fragment.

Issues:
- When ItemListFragment is first inflated the App Bar pushes the last item of the list below the bounds of the screen. This issue is no longer present after rotating the device. Simply adding padding to the bottom of the screen will not fix the issue as it will leave an unwanted space at the bottom of the screen after rotating. Numerous SO threads have failed to address this issue.
- Uses deprecated setOnPageChangeListener
- Upgrading the dependencies to 23.2.0 results in the ItemListFragment failing to inflate the correct Fragment when rotated so the application is stuck in an old version
- The code is probably more cumbersome than necessary

Please help me fix these bugs so we have a template that myself and others can use.


from xda-developers http://ift.tt/1UgHnV3
via IFTTT

No comments:

Post a Comment