This file contains 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
**Privacy Policy** | |
CÔNG TY CỔ PHẦN ĐẦU TƯ PHÁT TRIỂN CÔNG NGHỆ VÀ GIÁO DỤC EVI built the YoFun app as a Free app. This SERVICE is provided by CÔNG TY CỔ PHẦN ĐẦU TƯ PHÁT TRIỂN CÔNG NGHỆ VÀ GIÁO DỤC EVI at no cost and is intended for use as is. | |
This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service. | |
If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy. | |
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at YoFun unless otherwise defined in this Privacy Policy. |
This file contains 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
void callApi() { | |
disposable.add(apiService.callApi() | |
.doOnSubscribe(it -> { | |
// thông báo cho view hiển thị loading | |
mViewState.setValue(Define.ViewState.SHOW_LOADING) | |
}) | |
.doFinally(() -> { | |
// thông báo cho view ẩn loading vì chúng ta đã call api xong | |
mViewState.setValue(Define.ViewState.HIDE_LOADING) | |
}) |
This file contains 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
void callApi() { | |
disposable.add(apiService.callApi() | |
.doOnSubscribe(it -> { | |
// thông báo cho view hiển thị loading | |
}) | |
.doFinally(() -> { | |
// thông báo cho view ẩn loading vì chúng ta đã call api xong | |
}) | |
.subscribe(response -> { | |
// call api success |
This file contains 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
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | |
super.onViewCreated(view, savedInstanceState) | |
initView() | |
viewModel.viewState.observe(viewLifecycleOwner, Observer { viewState -> | |
viewState?.run { | |
when (viewState) { | |
ViewState.SHOW_LOADING -> (activity as? BaseActivity<*, *>)?.showLoading() | |
ViewState.HIDE_LOADING -> (activity as? BaseActivity<*, *>)?.hideLoading() | |
else -> handleViewState(viewState) | |
} |