This commit is contained in:
unknown
2020-03-31 17:57:27 +08:00
parent 9f886e9b33
commit d2f68969cb
5 changed files with 12 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ class AuthorizeFragment : MvpFragment<AuthorizeContract.View, AuthorizePresenter
} }
override fun initViews() { override fun initViews() {
Logger.d(TAG, "initView : ${this.javaClass.hashCode()}") Logger.d(TAG, "initView ")
AnalyticsUtil.track(INVOKE_TRACK_AUTHORIZE_SHOW) AnalyticsUtil.track(INVOKE_TRACK_AUTHORIZE_SHOW)
init() init()
Logger.d(TAG, "invokeTag :$invokeTag") Logger.d(TAG, "invokeTag :$invokeTag")

View File

@@ -1,6 +1,8 @@
package com.mogo.module.authorize.voice package com.mogo.module.authorize.voice
import android.content.Intent import android.content.Intent
import com.mogo.module.authorize.voice.VoiceUtil.VOICE_INTENT_AGREE
import com.mogo.module.authorize.voice.VoiceUtil.VOICE_INTENT_DISAGREE
import com.mogo.module.authorize.voice.VoiceUtil.VOICE_REGISTER_AUTHORIZE_AGREE import com.mogo.module.authorize.voice.VoiceUtil.VOICE_REGISTER_AUTHORIZE_AGREE
import com.mogo.module.authorize.voice.VoiceUtil.VOICE_REGISTER_AUTHORIZE_DISAGREE import com.mogo.module.authorize.voice.VoiceUtil.VOICE_REGISTER_AUTHORIZE_DISAGREE
import com.mogo.utils.logger.Logger import com.mogo.utils.logger.Logger
@@ -26,12 +28,12 @@ object VoiceManager {
fun handleOnIntentCmd(cmd: String, intent: Intent, listener: IVoiceIntentListener) { fun handleOnIntentCmd(cmd: String, intent: Intent, listener: IVoiceIntentListener) {
Logger.i(TAG, "handleOnIntentCmd: cmd -> $cmd") Logger.i(TAG, "handleOnIntentCmd: cmd -> $cmd")
when (cmd) { when (cmd) {
VOICE_REGISTER_AUTHORIZE_AGREE -> { VOICE_INTENT_AGREE -> {
Logger.i(TAG, "语音唤醒 同意") Logger.i(TAG, "语音唤醒 同意")
listener.onVoiceCmdAgree() listener.onVoiceCmdAgree()
} }
VOICE_REGISTER_AUTHORIZE_DISAGREE -> { VOICE_INTENT_DISAGREE -> {
Logger.i(TAG, "语音唤醒 不同意") Logger.i(TAG, "语音唤醒 不同意")
listener.onVoiceCmdDisAgree() listener.onVoiceCmdDisAgree()
} }
} }

View File

@@ -61,7 +61,7 @@ object VoiceUtil {
VOICE_REGISTER_AUTHORIZE_AGREE, VOICE_REGISTER_AUTHORIZE_AGREE,
agreeArray, voiceCommand agreeArray, voiceCommand
) )
// intentRegister?.registerIntentListener(VOICE_INTENT_AGREE, intentCommand) intentRegister?.registerIntentListener(VOICE_INTENT_AGREE, intentCommand)
} }
private fun registerDisAgree( private fun registerDisAgree(
@@ -75,7 +75,7 @@ object VoiceUtil {
VOICE_REGISTER_AUTHORIZE_DISAGREE, VOICE_REGISTER_AUTHORIZE_DISAGREE,
disAgreeArray, voiceCommand disAgreeArray, voiceCommand
) )
// intentRegister?.registerIntentListener(VOICE_INTENT_DISAGREE, intentCommand) intentRegister?.registerIntentListener(VOICE_INTENT_DISAGREE, intentCommand)
} }
fun unregisterAll(context: Context, listener: IVoiceIntentListener) { fun unregisterAll(context: Context, listener: IVoiceIntentListener) {

View File

@@ -35,11 +35,13 @@ class GuideStartFragment : MvpFragment<IView, Presenter<IView>>, View.OnClickLis
val mLinearGradient = LinearGradient(0f, 0f, 0f, moduleGuideTvStart.paint.textSize, val mLinearGradient = LinearGradient(0f, 0f, 0f, moduleGuideTvStart.paint.textSize,
Color.parseColor("#B3B3B3"), Color.parseColor("#EBEBEB"), Shader.TileMode.CLAMP) Color.parseColor("#B3B3B3"), Color.parseColor("#EBEBEB"), Shader.TileMode.CLAMP)
moduleGuideTvStart.paint.shader = mLinearGradient moduleGuideTvStart.paint.shader = mLinearGradient
moduleGuideTvStart.setOnClickListener(this)
moduleGuideIvStart.setOnClickListener(this)
} }
override fun onClick(v: View) { override fun onClick(v: View) {
when (v.id) { when (v.id) {
R.id.moduleGuideTvStart, R.id.moduleGuidetIvStart -> { R.id.moduleGuideTvStart, R.id.moduleGuideIvStart -> {
containerFragment?.moveToNext() containerFragment?.moveToNext()
} }
} }

View File

@@ -6,7 +6,7 @@
android:background="@mipmap/module_guide_item_start"> android:background="@mipmap/module_guide_item_start">
<ImageView <ImageView
android:id="@+id/moduleGuidetIvStart" android:id="@+id/moduleGuideIvStart"
android:layout_width="@dimen/dp_77" android:layout_width="@dimen/dp_77"
android:layout_height="@dimen/dp_77" android:layout_height="@dimen/dp_77"
android:layout_marginBottom="@dimen/dp_75" android:layout_marginBottom="@dimen/dp_75"