Closed SunnyDong-xyd closed 3 years ago
If we were to move our existing activities to fragments, we should consider keeping 2 activities, MainActivity to house the four main tabs (and other screens that may be needed), and PanicActivity to house exercises, phone-a-friend, locator, etc. Also worth considering leaving hardware activity on it's own until we implement the hardware component.
As discussed, will consolidate all activities into a single fragment.
Following the One Activity - Many Fragments app architecture is the preferred architecture recommended by Google (see attached link). Changing to this architecture facilitates easy transaction/caching of data between screens through Room for data storage persistence and supports visual application navigation flow through the use of Android Jetpack libraries. This could make development a lot easier moving forward as complex transactions are handled by the library.
Reference Links: https://android-developers.googleblog.com/2018/05/use-android-jetpack-to-accelerate-your.html?m=1 https://developer.android.com/jetpack/getting-started