[8.5.0]
[登录和登出]
This commit is contained in:
@@ -290,14 +290,15 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), 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<LoginFragment?, LoginPresenter?>(), 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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
app:layout_constraintTop_toTopOf="@id/unmanned_guideline_more_top" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.unmanned.UnmannedToolStopServiceView
|
||||
android:id="@+id/unmannedToolStopServiceView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
@@ -66,4 +67,14 @@
|
||||
app:layout_constraintStart_toStartOf="@id/unmanned_guideline_more_left"
|
||||
app:layout_constraintTop_toBottomOf="@id/unmanned_more_title" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.bone.unmanned.UnmannedToolLogoutView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_marginStart="@dimen/dp_36"
|
||||
android:layout_marginTop="@dimen/dp_40"
|
||||
android:layout_marginEnd="@dimen/dp_36"
|
||||
app:layout_constraintEnd_toEndOf="@id/unmanned_guideline_more_right"
|
||||
app:layout_constraintStart_toStartOf="@id/unmanned_guideline_more_left"
|
||||
app:layout_constraintTop_toBottomOf="@id/unmannedToolStopServiceView" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/clCheckSystem"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/viewCheckShutDown"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:contentDescription="@string/check_system_shut_down"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/icon_toolkit_item_stop_service"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/icon_toolkit_item_stop_service_background" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSignOut"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:text="@string/check_system_logout"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/sp_40"
|
||||
app:layout_constraintBottom_toBottomOf="@id/viewCheckShutDown"
|
||||
app:layout_constraintStart_toEndOf="@id/viewCheckShutDown"
|
||||
app:layout_constraintTop_toTopOf="@id/viewCheckShutDown" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -49,6 +49,7 @@
|
||||
<string name="bus_operation_title">Account Info</string>
|
||||
<string name="check_system_operation">System Operation</string>
|
||||
<string name="check_system_shut_down">One-click Shutdown</string>
|
||||
<string name="check_system_logout">Sign out</string>
|
||||
<string name="check_system_reboot">Reboot System</string>
|
||||
<string name="check_system_reboot_title">Reboot Notice</string>
|
||||
<string name="check_system_reboot_content">Reboot autonomous driving system?</string>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<string name="bus_operation_title">账户信息</string>
|
||||
<string name="check_system_operation">系统运行</string>
|
||||
<string name="check_system_shut_down">一键停服</string>
|
||||
<string name="check_system_logout">退出登录</string>
|
||||
<string name="check_system_reboot">重启系统</string>
|
||||
<string name="check_system_reboot_title">重启提示</string>
|
||||
<string name="check_system_reboot_content">是否重启自动驾驶系统?</string>
|
||||
|
||||
Reference in New Issue
Block a user