diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/LoginFragment.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/LoginFragment.kt index 5ff1b226cf..e557d580c0 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/LoginFragment.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/LoginFragment.kt @@ -290,14 +290,15 @@ class LoginFragment : MvpFragment(), ILoginView biz_login_svp?.setBackgroundResource(R.drawable.biz_login_bg_bus_end) } } - if (AppIdentityModeUtils.getCockpitType() == CockpitType.UNMANNED) { - cl_welcome_info?.visibility = View.VISIBLE - UiThreadHandler.postDelayed({ - mPresenter?.autoLogin() - }, 2_000, UiThreadHandler.MODE.QUEUE) - } else { - cl_login_info?.visibility = View.VISIBLE - } +// if (AppIdentityModeUtils.getCockpitType() == CockpitType.UNMANNED) { +// cl_welcome_info?.visibility = View.VISIBLE +// UiThreadHandler.postDelayed({ +// mPresenter?.autoLogin() +// }, 2_000, UiThreadHandler.MODE.QUEUE) +// } else { +// cl_login_info?.visibility = View.VISIBLE +// } + cl_login_info?.visibility = View.VISIBLE }else{ viewColdStart.setColdStartResultListener(object: ColdStartView.ColdStartResultListener{ override fun coldStartSuccess() { @@ -321,83 +322,41 @@ class LoginFragment : MvpFragment(), ILoginView } }) - if (AppIdentityModeUtils.getCockpitType() == CockpitType.UNMANNED) { - if (showLoginInfoAnimator11 == null) { - showLoginInfoAnimator11 = ObjectAnimator.ofFloat(cl_welcome_info, "alpha", 0f, 1f) - showLoginInfoAnimator11?.interpolator = LinearInterpolator() - } - if (showLoginInfoAnimator22 == null) { - val dp2px = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(), -50f) - showLoginInfoAnimator22 = ObjectAnimator.ofFloat(cl_welcome_info, "translationY", 0f, dp2px.toFloat()) - showLoginInfoAnimator22?.interpolator = DecelerateInterpolator() - } - UiThreadHandler.postDelayed({ - cl_welcome_info?.let { - val animatorSet = AnimatorSet() - animatorSet.playTogether(showLoginInfoAnimator11, showLoginInfoAnimator22) - animatorSet.duration = 500 - animatorSet.addListener(object : AnimatorListener { - override fun onAnimationStart(animation: Animator) { - cl_welcome_info?.visibility = View.VISIBLE - UiThreadHandler.postDelayed({ - mPresenter?.autoLogin() - }, 4_000, UiThreadHandler.MODE.QUEUE) - - } - - override fun onAnimationEnd(animation: Animator) { - - } - - override fun onAnimationCancel(animation: Animator) { - - } - - override fun onAnimationRepeat(animation: Animator) { - - } - - }) - animatorSet.start() - } - }, 1_000, UiThreadHandler.MODE.QUEUE) - } else { - if (showLoginInfoAnimator1 == null) { - showLoginInfoAnimator1 = ObjectAnimator.ofFloat(cl_login_info, "alpha", 0f, 1f) - showLoginInfoAnimator1?.interpolator = LinearInterpolator() - } - if (showLoginInfoAnimator2 == null) { - val dp2px = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(), -50f) - showLoginInfoAnimator2 = ObjectAnimator.ofFloat(cl_login_info, "translationY", 0f, dp2px.toFloat()) - showLoginInfoAnimator2?.interpolator = DecelerateInterpolator() - } - UiThreadHandler.postDelayed({ - cl_login_info?.let { - val animatorSet = AnimatorSet() - animatorSet.playTogether(showLoginInfoAnimator1, showLoginInfoAnimator2) - animatorSet.duration = 500 - animatorSet.addListener(object :AnimatorListener{ - override fun onAnimationStart(animation: Animator) { - cl_login_info?.visibility = View.VISIBLE - } - - override fun onAnimationEnd(animation: Animator) { - - } - - override fun onAnimationCancel(animation: Animator) { - - } - - override fun onAnimationRepeat(animation: Animator) { - - } - - }) - animatorSet.start() - } - },2_000,UiThreadHandler.MODE.QUEUE) + if (showLoginInfoAnimator1 == null) { + showLoginInfoAnimator1 = ObjectAnimator.ofFloat(cl_login_info, "alpha", 0f, 1f) + showLoginInfoAnimator1?.interpolator = LinearInterpolator() } + if (showLoginInfoAnimator2 == null) { + val dp2px = AutoSizeUtils.dp2px(AbsMogoApplication.getApp(), -50f) + showLoginInfoAnimator2 = ObjectAnimator.ofFloat(cl_login_info, "translationY", 0f, dp2px.toFloat()) + showLoginInfoAnimator2?.interpolator = DecelerateInterpolator() + } + UiThreadHandler.postDelayed({ + cl_login_info?.let { + val animatorSet = AnimatorSet() + animatorSet.playTogether(showLoginInfoAnimator1, showLoginInfoAnimator2) + animatorSet.duration = 500 + animatorSet.addListener(object :AnimatorListener{ + override fun onAnimationStart(animation: Animator) { + cl_login_info?.visibility = View.VISIBLE + } + + override fun onAnimationEnd(animation: Animator) { + + } + + override fun onAnimationCancel(animation: Animator) { + + } + + override fun onAnimationRepeat(animation: Animator) { + + } + + }) + animatorSet.start() + } + },2_000,UiThreadHandler.MODE.QUEUE) biz_login_svp?.startPlayLogic() } } diff --git a/OCH/shuttle/driver_unmanned/src/main/res/layout/shuttle_unmanned_more.xml b/OCH/shuttle/driver_unmanned/src/main/res/layout/shuttle_unmanned_more.xml index 6c5a81748c..1dedf22e66 100644 --- a/OCH/shuttle/driver_unmanned/src/main/res/layout/shuttle_unmanned_more.xml +++ b/OCH/shuttle/driver_unmanned/src/main/res/layout/shuttle_unmanned_more.xml @@ -57,6 +57,7 @@ app:layout_constraintTop_toTopOf="@id/unmanned_guideline_more_top" /> + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/unmanned/UnmannedToolLogoutView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/unmanned/UnmannedToolLogoutView.kt new file mode 100644 index 0000000000..1053451edb --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/unmanned/UnmannedToolLogoutView.kt @@ -0,0 +1,47 @@ +package com.mogo.eagle.core.function.hmi.bone.unmanned + +import android.content.Context +import android.util.AttributeSet +import android.view.LayoutInflater +import androidx.constraintlayout.widget.ConstraintLayout +import com.mogo.eagle.core.function.hmi.R +import com.mogo.eagle.core.utilcode.kotlin.onClick +import kotlinx.android.synthetic.main.unmanned_view_tool_logout.view.tvSignOut +import com.mogo.eagle.core.function.call.och.CallerOchBizFunctionCall4EagleManager + + +/** + * 一件停服 + */ +class UnmannedToolLogoutView @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null, + defStyleAttr: Int = 0 +) : ConstraintLayout(context, attrs, defStyleAttr) { + + companion object { + const val TAG = "UnmannedToolStopServiceView" + } + + init { + LayoutInflater.from(context).inflate(R.layout.unmanned_view_tool_logout, this, true) + initView() + } + + private fun initView() { + //一键停服 + tvSignOut.onClick { + CallerOchBizFunctionCall4EagleManager.logout() + } + + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + } + +} \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/unmanned_view_tool_logout.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/unmanned_view_tool_logout.xml new file mode 100644 index 0000000000..ed215e9ea0 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/unmanned_view_tool_logout.xml @@ -0,0 +1,35 @@ + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values-en/strings.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values-en/strings.xml index 8c81bd7f31..1b4325135d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values-en/strings.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values-en/strings.xml @@ -49,6 +49,7 @@ Account Info System Operation One-click Shutdown + Sign out Reboot System Reboot Notice Reboot autonomous driving system? diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml index 643369ced4..199b2752fb 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml @@ -49,6 +49,7 @@ 账户信息 系统运行 一键停服 + 退出登录 重启系统 重启提示 是否重启自动驾驶系统?