[8.5.0]
[singapore] [抽取独立登录]
This commit is contained in:
@@ -26,6 +26,7 @@ import com.mogo.och.biz.login.callback.ITaxiLoginCallback
|
||||
import com.mogo.och.biz.login.net.OchCommonServiceManager
|
||||
import com.mogo.och.bridge.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.biz.login.bean.LoginInfo
|
||||
import com.mogo.och.biz.login.ui.login.LoginViewModel
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.manager.cache.ISpCallback
|
||||
import com.mogo.och.common.module.manager.cache.OchSPManager
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.mogo.och.biz.login.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.och.biz.login.callback.ITaxiLoginCallback
|
||||
|
||||
@@ -1,30 +1,18 @@
|
||||
package com.mogo.och.biz.login.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.mvp.Presenter
|
||||
import com.mogo.eagle.core.utilcode.mogo.Product
|
||||
import com.mogo.eagle.core.utilcode.mogo.Vehicle
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON
|
||||
import com.mogo.eagle.core.utilcode.util.RegexUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.login.LoginConst
|
||||
import com.mogo.och.biz.login.LoginServiceManager
|
||||
import com.mogo.och.biz.login.callback.ITaxiLoginCallback
|
||||
import com.mogo.och.biz.login.ui.LoginFragment
|
||||
import com.mogo.och.biz.login.model.LoginModel
|
||||
import com.mogo.och.common.module.biz.login.ILoginCallback
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
/**
|
||||
@@ -60,21 +48,6 @@ class LoginPresenter(view: LoginFragment?) : Presenter<LoginFragment?>(view), IT
|
||||
mView?.setBg()
|
||||
}
|
||||
|
||||
fun getPhoneCode(phone:String){
|
||||
OchChainLogManager.writeChainLog("登录页面","获取验证码${phone}")
|
||||
if(!LoginModel.hasInit()){
|
||||
OchChainLogManager.writeChainLog("登录页面","LoginModel没有初始化去初始化")
|
||||
initListeners()
|
||||
}
|
||||
if (!RegexUtils.isMobileExact(phone)) {
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_phone_error)
|
||||
mView?.inputPhoneError()
|
||||
OchChainLogManager.writeChainLog("登录页面","获取验证码 手机号输入错误")
|
||||
return
|
||||
}
|
||||
LoginModel.getPhoneCode(phone)
|
||||
}
|
||||
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
super.onCreate(owner)
|
||||
CallerLogger.d(TAG, "登录-初始化")
|
||||
@@ -93,43 +66,6 @@ class LoginPresenter(view: LoginFragment?) : Presenter<LoginFragment?>(view), IT
|
||||
stopAutoLogin()
|
||||
}
|
||||
|
||||
override fun getPhoneCodeSuccess() {
|
||||
val countDownSeconds = 60L;
|
||||
countDownDisposable = Observable.intervalRange(0, countDownSeconds, 0, 1, TimeUnit.SECONDS)
|
||||
.map { aLong -> countDownSeconds - aLong }
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
mView?.setCountDownText("${it}s",false)
|
||||
CallerLogger.d(TAG, "倒计时:$it")
|
||||
}, {
|
||||
CallerLogger.d(TAG, "倒计时onError:${it}")
|
||||
it.printStackTrace()
|
||||
mView?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
||||
}, {
|
||||
CallerLogger.d(TAG, "倒计时onComplete")
|
||||
mView?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
||||
})
|
||||
}
|
||||
|
||||
fun autoLogin() {
|
||||
if (!isAutoLoginMode.compareAndSet(false, true)) return
|
||||
OchChainLogManager.writeChainLog(TAG, "启动自动登录循环")
|
||||
// 每隔 5 秒尝试一次登录
|
||||
autoLoginDisposable = Observable.interval(0, 12, TimeUnit.SECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
CallerLogger.d(TAG, "正在执行自动登录尝试...")
|
||||
if(!LoginModel.hasInit()){
|
||||
initListeners()
|
||||
}
|
||||
LoginModel.gotoLogin("13288888888", "8888",true)
|
||||
mView?.closeSoftInput()
|
||||
}, {
|
||||
CallerLogger.e(TAG, "自动登录循环异常: ${it.message}")
|
||||
})
|
||||
}
|
||||
|
||||
override fun stopAutoLogin() {
|
||||
isAutoLoginMode.set(false)
|
||||
autoLoginDisposable?.let {
|
||||
@@ -141,35 +77,9 @@ class LoginPresenter(view: LoginFragment?) : Presenter<LoginFragment?>(view), IT
|
||||
OchChainLogManager.writeChainLog(TAG, "登录成功,停止自动登录循环")
|
||||
}
|
||||
|
||||
fun gotoLogin(phone: String, code: String) {
|
||||
if(!LoginModel.hasInit()){
|
||||
initListeners()
|
||||
}
|
||||
if (!RegexUtils.isMobileExact(phone)) {
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_phone_error)
|
||||
mView?.inputPhoneError()
|
||||
return
|
||||
}
|
||||
if(code.isBlank()||code.length<4){
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_code_error)
|
||||
return
|
||||
}
|
||||
if(phone== LoginConst.OFFLINEPHONE&&code==LoginConst.OFFLINECODE){
|
||||
gotoOfflineMode()
|
||||
return
|
||||
}
|
||||
LoginModel.gotoLogin(phone, code, false)
|
||||
mView?.closeSoftInput()
|
||||
}
|
||||
|
||||
override fun netErrorCallback() {
|
||||
if (!isAutoLoginMode.get()) {
|
||||
mView?.showLoginOffLineModel()
|
||||
}
|
||||
}
|
||||
|
||||
fun gotoOfflineMode() {
|
||||
LoginModel.gotoOfflineMode()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,7 +22,6 @@ import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.ColdStartView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.CockpitType
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
@@ -41,18 +40,12 @@ import com.mogo.skin.utils.SkinResources
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
|
||||
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
|
||||
import com.shuyu.gsyvideoplayer.utils.Debuger
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_acbtn_login
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_ace_login_phone_value
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_acet_phone_code_value
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_actv_login_get_code
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_actv_login_show_sn
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_actv_welcome_login_title
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_cl_driver_main
|
||||
import kotlinx.android.synthetic.main.biz_login_view.biz_login_svp
|
||||
import kotlinx.android.synthetic.main.biz_login_view.bv_switch_business
|
||||
import kotlinx.android.synthetic.main.biz_login_view.cl_login_info
|
||||
import kotlinx.android.synthetic.main.biz_login_view.cl_welcome_info
|
||||
import kotlinx.android.synthetic.main.biz_login_view.eiv_Info
|
||||
import kotlinx.android.synthetic.main.biz_login_view.login_view_info
|
||||
import kotlinx.android.synthetic.main.biz_login_view.viewColdStart
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
@@ -68,9 +61,6 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
private var showLoginInfoAnimator1: ObjectAnimator? = null
|
||||
private var showLoginInfoAnimator2: ObjectAnimator? = null
|
||||
|
||||
private var showLoginInfoAnimator11: ObjectAnimator? = null
|
||||
private var showLoginInfoAnimator22: ObjectAnimator? = null
|
||||
|
||||
private var onlayoutListener: OnGlobalLayoutListener? = object : OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
try {
|
||||
@@ -80,8 +70,8 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
val mainInvisibleHeight = it.rootView.height - rect.bottom
|
||||
if (mainInvisibleHeight > 100) {
|
||||
val outLocation = IntArray(2)
|
||||
biz_acbtn_login.getLocationInWindow(outLocation)
|
||||
val srollHeight = (outLocation[1] + biz_acbtn_login.height) - rect.bottom
|
||||
login_view_info.getLocationInWindow(outLocation)
|
||||
val srollHeight = (outLocation[1] + login_view_info.height) - rect.bottom
|
||||
if (srollHeight > 0) {
|
||||
it.scrollTo(0, srollHeight)
|
||||
}
|
||||
@@ -115,7 +105,6 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
|
||||
}
|
||||
|
||||
inputPhoneNormal()
|
||||
initBg()
|
||||
initListener()
|
||||
}
|
||||
@@ -135,30 +124,7 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
}
|
||||
false
|
||||
}
|
||||
biz_acbtn_login.onClick {
|
||||
val phone = biz_ace_login_phone_value.text.toString()
|
||||
val code = biz_acet_phone_code_value.text.toString()
|
||||
mPresenter?.gotoLogin(phone, code)
|
||||
}
|
||||
biz_actv_welcome_login_title.setOnClickListener {
|
||||
continuousClick()
|
||||
}
|
||||
biz_actv_login_get_code.setOnClickListener {
|
||||
OchChainLogManager.writeChainLog("登录页面","点击获取验证码")
|
||||
if(mPresenter==null){
|
||||
OchChainLogManager.writeChainLog("司机登录页面","mPresenter=${mPresenter}")
|
||||
}else{
|
||||
mPresenter?.getPhoneCode(biz_ace_login_phone_value.text.toString())
|
||||
}
|
||||
}
|
||||
|
||||
biz_ace_login_phone_value.addTextChangedListener {
|
||||
it?.let { itEditable ->
|
||||
if (itEditable.isNotEmpty()) {
|
||||
inputPhoneNormal()
|
||||
}
|
||||
}
|
||||
}
|
||||
biz_actv_login_show_sn.text = SharedPrefsMgr.getInstance().sn
|
||||
if (BuildConfig.DEBUG) {
|
||||
biz_actv_login_show_sn.setOnLongClickListener {
|
||||
@@ -187,41 +153,6 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
KeyboardUtils.hideSoftInput(ActivityUtils.getTopActivity())
|
||||
}
|
||||
|
||||
fun setCountDownText(text: String, enable: Boolean) {
|
||||
if (enable) {
|
||||
biz_actv_login_get_code.setText(R.string.module_och_taxi_login_get_code)
|
||||
biz_actv_login_get_code.isEnabled = true
|
||||
} else {
|
||||
biz_actv_login_get_code.text = text
|
||||
biz_actv_login_get_code.isEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
fun inputPhoneError() {
|
||||
biz_ace_login_phone_value.text?.clear()
|
||||
biz_ace_login_phone_value.setHint(R.string.module_och_taxi_login_phone_error)
|
||||
context?.let {
|
||||
biz_ace_login_phone_value.setHintTextColor(
|
||||
ContextCompat.getColor(
|
||||
it,
|
||||
R.color.taxi_EF262C
|
||||
)
|
||||
)
|
||||
biz_ace_login_phone_value.setBackgroundResource(R.drawable.biz_login_phone_error)
|
||||
}
|
||||
}
|
||||
|
||||
private fun inputPhoneNormal() {
|
||||
context?.let {
|
||||
biz_ace_login_phone_value.setHintTextColor(
|
||||
ContextCompat.getColor(
|
||||
it,
|
||||
R.color.taxi_878890
|
||||
)
|
||||
)
|
||||
biz_ace_login_phone_value.setBackgroundResource(R.drawable.biz_login_phone_normal)
|
||||
}
|
||||
}
|
||||
|
||||
override fun createPresenter(): LoginPresenter {
|
||||
return LoginPresenter(this)
|
||||
@@ -232,24 +163,9 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val COUNTS = 4 // 点击次数
|
||||
private const val DURATION: Long = 1000 // 规定有效时间
|
||||
val TAG = LoginFragment::class.java.simpleName
|
||||
}
|
||||
|
||||
private var mHits = LongArray(COUNTS)
|
||||
|
||||
private fun continuousClick() {
|
||||
//每次点击时,数组向前移动一位
|
||||
System.arraycopy(mHits, 1, mHits, 0, mHits.size - 1)
|
||||
//为数组最后一位赋值
|
||||
mHits[mHits.size - 1] = SystemClock.uptimeMillis()
|
||||
if (mHits[0] >= (SystemClock.uptimeMillis() - DURATION)) {
|
||||
mHits = LongArray(COUNTS) //重新初始化数组
|
||||
mPresenter?.gotoLogin("13288888888", "8888")
|
||||
}
|
||||
}
|
||||
|
||||
override fun showErrorInfo(errorInfo: String) {
|
||||
ToastUtils.showLong(errorInfo)
|
||||
eiv_Info?.visibility = View.VISIBLE
|
||||
@@ -298,7 +214,7 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
// } else {
|
||||
// cl_login_info?.visibility = View.VISIBLE
|
||||
// }
|
||||
cl_login_info?.visibility = View.VISIBLE
|
||||
login_view_info?.visibility = View.VISIBLE
|
||||
}else{
|
||||
viewColdStart.setColdStartResultListener(object: ColdStartView.ColdStartResultListener{
|
||||
override fun coldStartSuccess() {
|
||||
@@ -323,22 +239,22 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
}
|
||||
})
|
||||
if (showLoginInfoAnimator1 == null) {
|
||||
showLoginInfoAnimator1 = ObjectAnimator.ofFloat(cl_login_info, "alpha", 0f, 1f)
|
||||
showLoginInfoAnimator1 = ObjectAnimator.ofFloat(login_view_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 = ObjectAnimator.ofFloat(login_view_info, "translationY", 0f, dp2px.toFloat())
|
||||
showLoginInfoAnimator2?.interpolator = DecelerateInterpolator()
|
||||
}
|
||||
UiThreadHandler.postDelayed({
|
||||
cl_login_info?.let {
|
||||
login_view_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
|
||||
login_view_info?.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
@@ -397,7 +313,8 @@ class LoginFragment : MvpFragment<LoginFragment?, LoginPresenter?>(), ILoginView
|
||||
.build(it)
|
||||
closeLineConfirmDialog.setClickListener(object : CommonDialogStatus.ClickListener {
|
||||
override fun confirm() {
|
||||
mPresenter?.gotoLogin(LoginConst.OFFLINEPHONE, LoginConst.OFFLINECODE)
|
||||
|
||||
login_view_info?.gotoLogin4Fragment(LoginConst.OFFLINEPHONE, LoginConst.OFFLINECODE)
|
||||
}
|
||||
|
||||
override fun cancel() {
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.mogo.och.biz.login.ui.login
|
||||
|
||||
import android.content.Context
|
||||
import android.os.SystemClock
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.widget.addTextChangedListener
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.lifecycle.findViewTreeViewModelStoreOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.KeyboardUtils
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.login.ui.LoginFragment
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_acbtn_login
|
||||
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_acet_phone_code_value
|
||||
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_ace_login_phone_value
|
||||
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_actv_login_get_code
|
||||
import kotlinx.android.synthetic.main.biz_login_view_old.view.biz_actv_welcome_login_title
|
||||
|
||||
|
||||
class LoginView : ConstraintLayout, LoginViewModel.IErrorInfoViewCallback {
|
||||
|
||||
private val TAG = "LoginView"
|
||||
|
||||
constructor(context: Context) : super(context)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)
|
||||
|
||||
constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(
|
||||
context,
|
||||
attributeSet,
|
||||
defStyleAttr
|
||||
)
|
||||
|
||||
constructor(
|
||||
context: Context,
|
||||
attributeSet: AttributeSet,
|
||||
defStyleAttr: Int,
|
||||
defStyleRes: Int
|
||||
) : super(context, attributeSet, defStyleAttr, defStyleRes)
|
||||
|
||||
private var viewModel: LoginViewModel? = null
|
||||
|
||||
private fun initView() {
|
||||
LayoutInflater.from(context).inflate(R.layout.biz_login_view_old, this, true)
|
||||
}
|
||||
|
||||
private fun initListener(){
|
||||
biz_acbtn_login.onClick {
|
||||
val phone = biz_ace_login_phone_value.text.toString()
|
||||
val code = biz_acet_phone_code_value.text.toString()
|
||||
viewModel?.gotoLogin(phone, code)
|
||||
}
|
||||
biz_actv_welcome_login_title.setOnClickListener {
|
||||
continuousClick()
|
||||
}
|
||||
biz_actv_login_get_code.setOnClickListener {
|
||||
OchChainLogManager.writeChainLog("登录页面","点击获取验证码")
|
||||
if(viewModel==null){
|
||||
OchChainLogManager.writeChainLog("司机登录页面","mPresenter=${viewModel}")
|
||||
}else{
|
||||
viewModel?.getPhoneCode(biz_ace_login_phone_value.text.toString())
|
||||
}
|
||||
}
|
||||
|
||||
biz_ace_login_phone_value.addTextChangedListener {
|
||||
it?.let { itEditable ->
|
||||
if (itEditable.isNotEmpty()) {
|
||||
inputPhoneNormal()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val COUNTS = 4 // 点击次数
|
||||
private const val DURATION: Long = 1000 // 规定有效时间
|
||||
val TAG = LoginFragment::class.java.simpleName
|
||||
}
|
||||
|
||||
private var mHits = LongArray(COUNTS)
|
||||
|
||||
private fun continuousClick() {
|
||||
//每次点击时,数组向前移动一位
|
||||
System.arraycopy(mHits, 1, mHits, 0, mHits.size - 1)
|
||||
//为数组最后一位赋值
|
||||
mHits[mHits.size - 1] = SystemClock.uptimeMillis()
|
||||
if (mHits[0] >= (SystemClock.uptimeMillis() - DURATION)) {
|
||||
mHits = LongArray(COUNTS) //重新初始化数组
|
||||
viewModel?.gotoLogin("13288888888", "8888")
|
||||
}
|
||||
}
|
||||
|
||||
private fun inputPhoneNormal() {
|
||||
context?.let {
|
||||
biz_ace_login_phone_value.setHintTextColor(
|
||||
ContextCompat.getColor(
|
||||
it,
|
||||
R.color.taxi_878890
|
||||
)
|
||||
)
|
||||
biz_ace_login_phone_value.setBackgroundResource(R.drawable.biz_login_phone_normal)
|
||||
}
|
||||
}
|
||||
|
||||
fun gotoLogin4Fragment(phone: String, code: String){
|
||||
viewModel?.gotoLogin(phone, code)
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
|
||||
viewModel = findViewTreeViewModelStoreOwner()?.let {
|
||||
ViewModelProvider(it).get(LoginViewModel::class.java)
|
||||
}
|
||||
|
||||
viewModel?.setDistanceCallback(this)
|
||||
}
|
||||
|
||||
|
||||
override fun onVisibilityAggregated(isVisible: Boolean) {
|
||||
super.onVisibilityAggregated(isVisible)
|
||||
|
||||
}
|
||||
|
||||
fun getBottomInfo(){
|
||||
|
||||
}
|
||||
|
||||
init {
|
||||
try {
|
||||
initView()
|
||||
initListener()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
override fun inputPhoneError() {
|
||||
biz_ace_login_phone_value.text?.clear()
|
||||
biz_ace_login_phone_value.setHint(R.string.module_och_taxi_login_phone_error)
|
||||
context?.let {
|
||||
biz_ace_login_phone_value.setHintTextColor(
|
||||
ContextCompat.getColor(
|
||||
it,
|
||||
R.color.taxi_EF262C
|
||||
)
|
||||
)
|
||||
biz_ace_login_phone_value.setBackgroundResource(R.drawable.biz_login_phone_error)
|
||||
}
|
||||
}
|
||||
|
||||
override fun closeSoftInput() {
|
||||
requestFocus()
|
||||
KeyboardUtils.hideSoftInput(ActivityUtils.getTopActivity())
|
||||
}
|
||||
|
||||
override fun setCountDownText(text: String, enable: Boolean) {
|
||||
if (enable) {
|
||||
biz_actv_login_get_code.setText(R.string.module_och_taxi_login_get_code)
|
||||
biz_actv_login_get_code.isEnabled = true
|
||||
} else {
|
||||
biz_actv_login_get_code.text = text
|
||||
biz_actv_login_get_code.isEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.mogo.och.biz.login.ui.login
|
||||
|
||||
import androidx.lifecycle.ViewModel
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.RegexUtils
|
||||
import com.mogo.och.biz.R
|
||||
import com.mogo.och.biz.login.LoginConst
|
||||
import com.mogo.och.biz.login.callback.ITaxiLoginCallback
|
||||
import com.mogo.och.biz.login.model.LoginModel
|
||||
import com.mogo.och.biz.login.ui.debugview.BusinessViewModel
|
||||
import com.mogo.och.common.module.biz.login.ILoginCallback
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.wigets.toast.ToastCharterUtils
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class LoginViewModel : ViewModel(), ITaxiLoginCallback, ILoginCallback {
|
||||
|
||||
private val TAG = BusinessViewModel::class.java.simpleName
|
||||
|
||||
private var viewCallback: IErrorInfoViewCallback? = null
|
||||
|
||||
private var countDownDisposable: Disposable? = null
|
||||
|
||||
|
||||
init {
|
||||
|
||||
}
|
||||
|
||||
fun setDistanceCallback(viewCallback: IErrorInfoViewCallback) {
|
||||
this.viewCallback = viewCallback
|
||||
initListeners()
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
this.viewCallback = null
|
||||
countDownDisposable?.let {
|
||||
if (!it.isDisposed) {
|
||||
it.dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initListeners() {
|
||||
LoginModel.setiTaxiLoginCallback(this)
|
||||
LoginStatusManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
fun gotoLogin(phone: String, code: String) {
|
||||
if(!LoginModel.hasInit()){
|
||||
initListeners()
|
||||
}
|
||||
if (!RegexUtils.isMobileExact(phone)) {
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_phone_error)
|
||||
viewCallback?.inputPhoneError()
|
||||
return
|
||||
}
|
||||
if(code.isBlank()||code.length<4){
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_code_error)
|
||||
return
|
||||
}
|
||||
if(phone== LoginConst.OFFLINEPHONE&&code== LoginConst.OFFLINECODE){
|
||||
gotoOfflineMode()
|
||||
return
|
||||
}
|
||||
LoginModel.gotoLogin(phone, code, false)
|
||||
viewCallback?.closeSoftInput()
|
||||
}
|
||||
|
||||
fun getPhoneCode(phone: String) {
|
||||
OchChainLogManager.writeChainLog("登录页面","获取验证码${phone}")
|
||||
if(!LoginModel.hasInit()){
|
||||
OchChainLogManager.writeChainLog("登录页面","LoginModel没有初始化去初始化")
|
||||
initListeners()
|
||||
}
|
||||
if (!RegexUtils.isMobileExact(phone)) {
|
||||
ToastCharterUtils.showToastShort(R.string.module_och_taxi_login_phone_error)
|
||||
viewCallback?.inputPhoneError()
|
||||
OchChainLogManager.writeChainLog("登录页面","获取验证码 手机号输入错误")
|
||||
return
|
||||
}
|
||||
LoginModel.getPhoneCode(phone)
|
||||
}
|
||||
|
||||
override fun getPhoneCodeSuccess() {
|
||||
super.getPhoneCodeSuccess()
|
||||
val countDownSeconds = 60L;
|
||||
countDownDisposable = Observable.intervalRange(0, countDownSeconds, 0, 1, TimeUnit.SECONDS)
|
||||
.map { aLong -> countDownSeconds - aLong }
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe({
|
||||
viewCallback?.setCountDownText("${it}s",false)
|
||||
CallerLogger.d(TAG, "倒计时:$it")
|
||||
}, {
|
||||
CallerLogger.d(TAG, "倒计时onError:${it}")
|
||||
it.printStackTrace()
|
||||
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
||||
}, {
|
||||
CallerLogger.d(TAG, "倒计时onComplete")
|
||||
viewCallback?.setCountDownText(AbsMogoApplication.getApp().getString(R.string.module_och_taxi_login_get_code),true)
|
||||
})
|
||||
}
|
||||
|
||||
private fun gotoOfflineMode() {
|
||||
LoginModel.gotoOfflineMode()
|
||||
}
|
||||
|
||||
interface IErrorInfoViewCallback {
|
||||
fun inputPhoneError()
|
||||
fun closeSoftInput()
|
||||
fun setCountDownText(text: String, enable: Boolean)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -28,7 +28,6 @@ import com.mogo.och.common.module.manager.InputManager
|
||||
import com.mogo.och.common.module.manager.InputTextChangeListener
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.utils.ResourcesUtils
|
||||
import com.mogo.och.common.module.wigets.KeyboarView
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.acctv_search_byid
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.aciv_input_icon
|
||||
import kotlinx.android.synthetic.main.biz_taxi_select.view.aciv_refresh_task
|
||||
|
||||
@@ -14,166 +14,16 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/cl_welcome_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_166"
|
||||
android:layout_marginTop="@dimen/dp_700"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_444"
|
||||
android:layout_height="@dimen/dp_98"
|
||||
android:text="@string/login_welcome_on"
|
||||
android:textColor="#FF394047"
|
||||
android:textSize="@dimen/sp_70" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:src="@drawable/biz_login_robobus" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_login_info"
|
||||
<com.mogo.och.biz.login.ui.login.LoginView
|
||||
android:id="@+id/login_view_info"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@drawable/biz_login_pop_bg"
|
||||
android:visibility="gone"
|
||||
android:layout_marginTop="@dimen/dp_286"
|
||||
android:layout_marginStart="@dimen/dp_70"
|
||||
android:visibility="gone"
|
||||
android:layout_width="1042dp"
|
||||
android:layout_height="1169dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_h_top"
|
||||
app:layout_constraintGuide_begin="@dimen/dp_22"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_v_left"
|
||||
app:layout_constraintGuide_begin="@dimen/dp_42"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/biz_actv_welcome_login_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_99"
|
||||
android:layout_marginTop="@dimen/dp_104"
|
||||
android:text="@string/module_och_taxi_login_title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="70dp"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline_h_top" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_login_phone_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:text="@string/module_och_taxi_login_get_phone_title"
|
||||
android:textColor="@color/biz_login_C6C6C6"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_actv_welcome_login_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/biz_actv_welcome_login_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/biz_ace_login_phone_value"
|
||||
android:layout_width="@dimen/dp_760"
|
||||
android:layout_height="@dimen/dp_136"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:background="@drawable/biz_login_phone_normal"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:maxLength="11"
|
||||
android:hint="@string/module_och_taxi_login_phone_hint_text"
|
||||
android:textColorHint="@color/white"
|
||||
android:inputType="numberSigned"
|
||||
android:paddingStart="30dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_login_phone_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_login_phone_title"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_phone_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:text="@string/module_och_taxi_login_get_code_title"
|
||||
android:textColor="@color/biz_login_C6C6C6"
|
||||
android:textSize="40dp"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||
app:layout_constraintTop_toBottomOf="@+id/biz_ace_login_phone_value" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_phone_code_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_phone_code_title"
|
||||
android:background="@drawable/biz_login_phone_normal"
|
||||
android:layout_width="@dimen/dp_760"
|
||||
android:layout_height="@dimen/dp_136"
|
||||
android:layout_marginTop="30dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/biz_acet_phone_code_value"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_phone_code_bg"
|
||||
tools:text="1881"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white"
|
||||
android:background="@null"
|
||||
android:inputType="numberSigned"
|
||||
android:gravity="center_vertical"
|
||||
android:imeOptions="actionDone"
|
||||
android:paddingStart="30dp"
|
||||
android:maxLength="4"
|
||||
android:layout_width="518dp"
|
||||
android:layout_height="136dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/biz_actv_login_get_code"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/v_phone_code_bg"
|
||||
android:paddingEnd="30dp"
|
||||
android:textSize="40dp"
|
||||
app:pressed_enabled="false"
|
||||
android:textColor="@color/biz_login_getcode_text_color_selector"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="@string/module_och_taxi_login_get_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="136dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/biz_acbtn_login"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||
android:background="@drawable/biz_login_bg"
|
||||
android:layout_marginTop="118dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/module_och_taxi_login_btn"
|
||||
android:gravity="center"
|
||||
android:textSize="40dp"
|
||||
android:layout_width="760dp"
|
||||
android:layout_height="136dp"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
|
||||
144
OCH/common/biz/src/main/res/layout/biz_login_view_old.xml
Normal file
144
OCH/common/biz/src/main/res/layout/biz_login_view_old.xml
Normal file
@@ -0,0 +1,144 @@
|
||||
<?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"
|
||||
android:id="@+id/biz_cl_driver_main"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_login_info"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@drawable/biz_login_pop_bg"
|
||||
android:layout_width="1042dp"
|
||||
android:layout_height="1169dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_h_top"
|
||||
app:layout_constraintGuide_begin="@dimen/dp_22"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline_v_left"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="@dimen/dp_42" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/biz_actv_welcome_login_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_99"
|
||||
android:layout_marginTop="@dimen/dp_104"
|
||||
android:text="@string/module_och_taxi_login_title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="70dp"
|
||||
app:layout_constraintStart_toStartOf="@+id/guideline_v_left"
|
||||
app:layout_constraintTop_toTopOf="@+id/guideline_h_top" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_login_phone_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:text="@string/module_och_taxi_login_get_phone_title"
|
||||
android:textColor="@color/biz_login_C6C6C6"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_actv_welcome_login_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/biz_actv_welcome_login_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/biz_ace_login_phone_value"
|
||||
android:layout_width="@dimen/dp_760"
|
||||
android:layout_height="@dimen/dp_136"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:background="@drawable/biz_login_phone_normal"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:maxLength="11"
|
||||
android:hint="@string/module_och_taxi_login_phone_hint_text"
|
||||
android:textColorHint="@color/white"
|
||||
android:inputType="numberSigned"
|
||||
android:paddingStart="30dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_40"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_login_phone_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_login_phone_title"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_phone_code_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_50"
|
||||
android:text="@string/module_och_taxi_login_get_code_title"
|
||||
android:textColor="@color/biz_login_C6C6C6"
|
||||
android:textSize="40dp"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||
app:layout_constraintTop_toBottomOf="@+id/biz_ace_login_phone_value" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_phone_code_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_phone_code_title"
|
||||
android:background="@drawable/biz_login_phone_normal"
|
||||
android:layout_width="@dimen/dp_760"
|
||||
android:layout_height="@dimen/dp_136"
|
||||
android:layout_marginTop="30dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/biz_acet_phone_code_value"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/v_phone_code_bg"
|
||||
tools:text="1881"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/white"
|
||||
android:background="@null"
|
||||
android:inputType="numberSigned"
|
||||
android:gravity="center_vertical"
|
||||
android:imeOptions="actionDone"
|
||||
android:paddingStart="30dp"
|
||||
android:maxLength="4"
|
||||
android:layout_width="518dp"
|
||||
android:layout_height="136dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/biz_actv_login_get_code"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/v_phone_code_bg"
|
||||
android:paddingEnd="30dp"
|
||||
android:textSize="40dp"
|
||||
app:pressed_enabled="false"
|
||||
android:textColor="@color/biz_login_getcode_text_color_selector"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="@string/module_och_taxi_login_get_code"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="136dp"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/biz_acbtn_login"
|
||||
app:layout_constraintTop_toBottomOf="@+id/v_phone_code_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/biz_ace_login_phone_value"
|
||||
android:background="@drawable/biz_login_bg"
|
||||
android:layout_marginTop="118dp"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/module_och_taxi_login_btn"
|
||||
android:gravity="center"
|
||||
android:textSize="40dp"
|
||||
android:layout_width="760dp"
|
||||
android:layout_height="136dp"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.mogo.och.common.module.biz.lansocket
|
||||
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
@@ -21,7 +20,6 @@ import com.mogo.och.common.module.manager.socket.lan.bean.ChangeBusinessType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.DPMsgType
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.EnvCheck
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.RemoteNoticeModel2Client
|
||||
import com.mogo.och.common.module.manager.socket.lan.bean.ScreenType
|
||||
import com.mogo.och.common.module.utils.DateTimeUtil
|
||||
import com.mogo.och.common.module.utils.FlavorUtils
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OFFLINE
|
||||
import com.mogo.och.common.module.biz.lansocket.LoginLanDriverSocket
|
||||
import com.mogo.och.common.module.biz.login.ILoginCallback
|
||||
import com.mogo.och.common.module.biz.login.EnumLoginStatus
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.mogo.map.listener.IMogoMapListener
|
||||
import com.mogo.map.listener.MogoMapListenerHandler
|
||||
import com.mogo.map.uicontroller.EnumMapUI
|
||||
import com.mogo.och.common.module.R
|
||||
import com.mogo.skin.utils.SkinResources
|
||||
import com.mogo.och.common.module.biz.login.ILoginCallback
|
||||
import com.mogo.och.common.module.biz.login.LoginStatusManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
|
||||
@@ -27,7 +27,6 @@ import com.mogo.och.bridge.autopilot.line.LineManager
|
||||
import com.mogo.och.bridge.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.common.module.biz.birdge.BridgeListener
|
||||
import com.mogo.och.common.module.biz.birdge.BridgeManager
|
||||
import com.mogo.och.common.module.constant.OchCommonConst
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import com.mogo.och.common.module.manager.loop.BizLoopManager
|
||||
import com.mogo.och.common.module.manager.loop.LoopInfo
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.StringUtils
|
||||
import com.mogo.och.common.module.biz.lansocket.IOchLanPassengerStatusListener
|
||||
import com.mogo.och.common.module.biz.lansocket.LoginLanPassengerSocket
|
||||
import com.mogo.och.common.module.biz.media.MediaManager
|
||||
|
||||
@@ -11,18 +11,14 @@ import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.mgintelligent.speech.iflytek.WakeManager
|
||||
import com.mogo.och.bridge.autopilot.autopilot.IOchAutopilotStatusListener
|
||||
import com.mogo.och.bridge.autopilot.autopilot.OchAutoPilotStatusListenerManager
|
||||
import com.mogo.och.common.module.manager.debug.DebugViewWatchDogFragment
|
||||
import com.mogo.och.unmanned.passenger.ui.debug.DebugEvent
|
||||
import com.mogo.och.unmanned.taxi.passenger.R
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_statusview.view.bcsv_status
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_statusview.view.vShowDebugView
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_statusview.view.iv_biz_icon
|
||||
import kotlinx.android.synthetic.main.taxt_u_p_statusview.view.textClockDate
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
Reference in New Issue
Block a user