add voice broadcast and add guideView
This commit is contained in:
@@ -10,6 +10,8 @@ class AuthorizeContract {
|
||||
fun readyToAuthorize()
|
||||
|
||||
fun showAuthorizationError()
|
||||
|
||||
fun voiceAuthorizeError()
|
||||
}
|
||||
|
||||
interface Biz {
|
||||
|
||||
@@ -32,7 +32,7 @@ class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter
|
||||
}
|
||||
|
||||
private var agreementId: Long = 0L
|
||||
private var invokeTag:String? = null
|
||||
private var invokeTag: String? = null
|
||||
|
||||
private var clErrorContainer: ConstraintLayout? = null
|
||||
private var clLoadAuthorizeContainer: ConstraintLayout? = null
|
||||
@@ -64,9 +64,9 @@ class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter
|
||||
VoiceUtil.registerAll(context!!, this, this)
|
||||
}
|
||||
|
||||
private fun init(){
|
||||
if(mRootView == null){
|
||||
Logger.d(TAG,"joker ?")
|
||||
private fun init() {
|
||||
if (mRootView == null) {
|
||||
Logger.d(TAG, "joker ?")
|
||||
mRootView = view
|
||||
}
|
||||
clErrorContainer = mRootView.findViewById(R.id.clLoadingErrorContainer)
|
||||
@@ -116,6 +116,10 @@ class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter
|
||||
clErrorContainer?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun voiceAuthorizeError() {
|
||||
VoiceUtil.speak(context!!.getString(R.string.module_authorize_failed), context!!, this)
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.btnAuthorizeAgree -> {
|
||||
|
||||
@@ -2,12 +2,14 @@ package com.mogo.module.authorize.fragment
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.module.authorize.R
|
||||
import com.mogo.module.authorize.authprovider.biz.MogoAuthorizeRegisterHandler
|
||||
import com.mogo.module.authorize.authprovider.launcher.MogoAuthorizeMainController
|
||||
import com.mogo.module.authorize.authprovider.launcher.MogoMainAuthorize.Companion.mogoAuthShow
|
||||
import com.mogo.module.authorize.model.bean.Agreement
|
||||
import com.mogo.module.authorize.util.DateUtil.parseDateToTime
|
||||
import com.mogo.module.authorize.util.SharedPreferenceUtil.updateAuthorizeVersion
|
||||
import com.mogo.module.authorize.voice.VoiceUtil
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
class AuthorizePresenter : Presenter<AuthorizeContract.View>, AuthorizeContract.Biz {
|
||||
@@ -80,6 +82,7 @@ class AuthorizePresenter : Presenter<AuthorizeContract.View>, AuthorizeContract.
|
||||
}, {
|
||||
closeAuthorizeView()
|
||||
})
|
||||
mView.voiceAuthorizeError()
|
||||
}
|
||||
|
||||
private fun closeAuthorizeView() {
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
<string name="module_authorize_agreement_loading">正在加载,请稍等...</string>
|
||||
<string name="module_authorize_agreement_error">加载失败</string>
|
||||
<string name="module_authorize_agreement_retry">点击重试</string>
|
||||
<string name="module_authorize_agreement_tip">您还没有授权,不可分享,您可以说“同意”进行授权。</string>
|
||||
<string name="module_authorize_agreement_tip">请阅读用户协议并做出选择。未授权部分功能的使用会受到限制。您可以说“同意”进行授权。</string>
|
||||
<string name="module_authorize_failed">授权失败</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user