<@U092308M7>: Sure. I have a LoginView Interface ...
# announcements
@orangy: Sure. I have a LoginView Interface
Copy code
interface  LoginView {
    val  loginPresenter: LoginPresenter

    fun login(username:String, password:String)
A login Presenter
Copy code
class LoginPresenter() {

    fun login(username: String, password: String) {
        //simple network call
And a LoginViewFragment
Copy code
class LoginViewFragment() : Fragment(), LoginView {
    override val loginPresenter = LoginPresenter()

    val layout: Int = R.layout.fragment_login

    override fun login(username: String, password: String) {
        loginPresenter.login(username, password)
   override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        var view: View = inflater!!.inflate(layout, container, false)
        var btnSignIn: Button = view.findViewById(R.id.btnSignIn) as Button
        var etMobile = view.findViewById(R.id.etMobile) as EditText
        var etPassword = view.findViewById(R.id.etPassword) as EditText
        btnSignIn.setOnClickListener(View.OnClickListener { login(etMobile.text.toString(), etPassword.text.toString()) })
        return view;

Note: It's Android