Created
July 11, 2017 18:45
-
-
Save theerasan/fcfcd61d272d2bf19e870700723f81d5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var binding: ActivityLoginArch2WaysBindingBinding? = null | |
var viewModel: LoginArch2WaysBindingViewModel? = null | |
var presenter: LoginArch2WaysBindingInf.PresenterInf? = null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
initView() | |
initViewModel() | |
initPresenter() | |
} | |
private fun initView() { | |
binding = DataBindingUtil.setContentView(this, R.layout.activity_login_arch_2_ways_binding) | |
} | |
private fun initViewModel() { | |
viewModel = LoginArch2WaysBindingViewModel() | |
binding!!.viewModel = viewModel | |
} | |
private fun initPresenter() { | |
presenter = LoginArch2WaysBindingPresenter(viewModel, this) | |
presenter!!.onInit() | |
} | |
override fun performLogin(stringToShow: String) { | |
Toast.makeText(this, stringToShow, Toast.LENGTH_LONG).show() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment