In application development, Model View Presenter is one of the design patterns. In the MVP design pattern, Presenter manages all the communication between View and Model. Just as discussed earlier in the MVVM tutorial, where View Model acts as Presenter. Model View Presenter MVP Design pattern Components: As shown in the MVP diagram, each component…
At a professional stage of application development, each developer follows a design pattern to write code. The reason to follow the design pattern is to keep the application code simple and easy to understand. Above all, a good design pattern improves the performance of our applications and makes them more…
In the View Binding tutorial, we were limited to bind views of a layout file to the activity class to get rid of FindViewById(). However, Data Binding allows us to bind UI elements directly with the data source in the XML file itself. Moreover, it allows us to bind ClickListeners and…
As android developers, we use FindViewById() in our Activity and Fragment. It is important to access every view in the layout.xml file to our activity class. As a result, this added a lot of code in our activity class. Moreover, it causes our class to become more complex and difficult to maintain. Therefore, view…