Hey guys, I've been building an app with the MVP a...
# android
k
Hey guys, I've been building an app with the MVP architecture and currently have all my views (which are fragments) implementing a base view interface
Copy code
interface BaseView<T> {
    var presenter: T
}
All of my presenters implement a base presenter interface too
Copy code
interface BasePresenter<T> {
    var view: T?

    fun attachView(view: T) { this.view = view}
    fun detachView()  { this.view = null}
}