Android MVVM framework construction Navigation + Fragment + BottomNavigationView

preface   you are already familiar with the MVVM framework pattern in these articles. The specific architecture pattern is shown in the following figure: The Activity/Fragment of the upper layer is represented as the View layer, which operates the data through the ViewModel, and then the Repository controls the source of the data, wh ...

Posted by jadebabe on Tue, 23 Nov 2021 05:47:35 -0800

Android uses BottomNavigationView and navigation components to implement bottom navigation

The renderings are as follows: Implementation steps: Don't forget to add the required dependencies before working implementation 'androidx.navigation:navigation-fragment:2.2.2' implementation 'androidx.navigation:navigation-ui:2.2.2' 1, First, make preparations and create four fragments, corresponding layout files and menu files 1. Four ...

Posted by danmahoney245 on Sun, 10 Oct 2021 01:55:46 -0700