extracting view setup to its own method -
follows other ftue fragment conventions
This commit is contained in:
parent
6304d5dc93
commit
05a7d40950
|
@ -43,12 +43,14 @@ class FtueAuthCombinedServerSelectionFragment @Inject constructor() : AbstractFt
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
views.chooseServerRoot.realignPercentagesToParent()
|
setupViews()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupViews() {
|
||||||
|
views.chooseServerRoot.realignPercentagesToParent()
|
||||||
views.chooseServerToolbar.setNavigationOnClickListener {
|
views.chooseServerToolbar.setNavigationOnClickListener {
|
||||||
viewModel.handle(OnboardingAction.PostViewEvent(OnboardingViewEvents.OnBack))
|
viewModel.handle(OnboardingAction.PostViewEvent(OnboardingViewEvents.OnBack))
|
||||||
}
|
}
|
||||||
|
|
||||||
views.chooseServerInput.editText?.setOnEditorActionListener { _, actionId, _ ->
|
views.chooseServerInput.editText?.setOnEditorActionListener { _, actionId, _ ->
|
||||||
when (actionId) {
|
when (actionId) {
|
||||||
EditorInfo.IME_ACTION_DONE -> {
|
EditorInfo.IME_ACTION_DONE -> {
|
||||||
|
@ -57,12 +59,8 @@ class FtueAuthCombinedServerSelectionFragment @Inject constructor() : AbstractFt
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
views.chooseServerGetInTouch.debouncedClicks { openUrlInExternalBrowser(requireContext(), getString(R.string.ftue_ems_url)) }
|
views.chooseServerGetInTouch.debouncedClicks { openUrlInExternalBrowser(requireContext(), getString(R.string.ftue_ems_url)) }
|
||||||
|
views.chooseServerSubmit.debouncedClicks { updateServerUrl() }
|
||||||
views.chooseServerSubmit.debouncedClicks {
|
|
||||||
updateServerUrl()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateServerUrl() {
|
private fun updateServerUrl() {
|
||||||
|
|
Loading…
Reference in New Issue