MVP in Android
Overview MVP stands for Model-View-Presenter. MVP overcomes the challenges of MVC. It provides modularity, testability and a more clean codebase. Key points of MVP architecture Communication between View-Presenter and Model-Presenter happens with the help of an interface. One Presenter manages one View at a time. Model and View doesn't have knowledge about each other. Steps to follow Create an interface to communicate between View-Presenter and Model-Presenter interface Contract { /* This interface is used for view */ interface View { /* Shows the progress bar */ fun showProgressBar () /* Hides the progress bar */ fun hideProgressBar () /* Sets the text of the view with the String */ fun setString (string : String?) } interface Model { interface OnFinished { fun finish (string : String?) } // This function is used to check if the String is set fun goN...