``` interface BasePresenter<T> { var vie...
# android
k
Copy code
interface BasePresenter<T> {
    var view: T?

    fun attachView(view: T) { this.view = view}
    fun detachView()  { this.view = null}
}
c
Do you need the type parameters for the View. I typically only put them on the Presenter
k
I don't see how I'd define the attachView and detachView functions without a type parameter 😕
c
Create an abstract class that implements the BasePresenter interface
That example I made is not fully fleshed out, so don’t completely follow it, but it might be able to get the idea across
k
hmm
this might be good
I will try it out and get back to you
thank you 🙂