Is my app suitable for converting to the “fragment design paradigm”?
-
12-11-2019 - |
Question
I am wondering if my app is suitable for converting to fragments.
I have worked through several tutorials: android Shakespeare, vogella, and the excellent lunchlist. They share the same design, a list on the left side, “information” on the right side. All of the entries in the list have the same corresponding view type on the right side (many-to-one).
My app would be a departure from this: each entry in the list on the left side would correspond to a different view type on the right. There would be 10 entries on the left side, with 10 different views on the right (one-to-one).
Could I persevere with fragments, and do a lot of FragmentTransaction management or should I keep my app as is?
Solution
I think you should use fragments because:
- Fragments are a core part of the longer-term trajectory for Android
- Using them now will help you understand how to use them, so future projects are easier
- Implementing fragments isn't that complicated, so why not?
- Having different view types in your detail fragment is compatible with using fragments
- If you use fragments in the app now, it'll make it easier to tweak the app later for different devices types & orientations