Merge remote-tracking branch 'origin/dev_minibus-d_230425_3.2.0' into dev_minibus-d_230425_3.2.0
@@ -1,13 +1,6 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.ui.M1CarUserNoOrderFragment
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorCallback
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
|
||||
import io.reactivex.disposables.Disposable
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1CarUserNoOrderFragment
|
||||
|
||||
class BusPassengerCarUseAndNoOrderPresenter(view: M1CarUserNoOrderFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<M1CarUserNoOrderFragment?>(view){
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.ui.M1DeviceFragment
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorCallback
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
class BusPassengerFunctionDevicePresenter(view: M1DeviceFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<M1DeviceFragment?>(view) {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "BusPassengerFunctionDevicePresenter"
|
||||
}
|
||||
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
super.onCreate(owner)
|
||||
}
|
||||
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
super.onDestroy(owner)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import com.mogo.och.bus.passenger.model.IOrderStatusChangeListener
|
||||
import com.mogo.och.bus.passenger.model.OrderStatusEnum
|
||||
import com.mogo.och.bus.passenger.net.BusPassengerModelLoopManager
|
||||
import com.mogo.och.bus.passenger.net.BusPassengerServiceManager
|
||||
import com.mogo.och.bus.passenger.ui.M1OrderFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1OrderLineFragment
|
||||
import com.mogo.och.common.module.bean.dpmsg.ChangeDestMsg
|
||||
import com.mogo.och.common.module.bean.dpmsg.DPMsgType
|
||||
import com.mogo.och.common.module.biz.constant.OchCommonConst
|
||||
@@ -30,8 +30,8 @@ import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
class BusPassengerFunctionOrderPresenter(view: M1OrderFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<M1OrderFragment?>(view), IOrderStatusChangeListener {
|
||||
class BusPassengerFunctionOrderPresenter(view: M1OrderLineFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<M1OrderLineFragment?>(view), IOrderStatusChangeListener {
|
||||
|
||||
companion object{
|
||||
|
||||
@@ -277,7 +277,9 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderFragment?) :
|
||||
"",
|
||||
0,
|
||||
"",
|
||||
false
|
||||
false,
|
||||
1,
|
||||
0
|
||||
)
|
||||
CallerTelematicManager.sendMsgToServer(
|
||||
OchCommonConst.BUSINESS_STRING,
|
||||
@@ -316,7 +318,9 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderFragment?) :
|
||||
currentSite!!.siteName!!,
|
||||
siteInfo.siteId!!.toInt(),
|
||||
siteInfo.siteName!!,
|
||||
false
|
||||
false,
|
||||
1,
|
||||
0,
|
||||
)
|
||||
CallerTelematicManager.sendMsgToServer(
|
||||
OchCommonConst.BUSINESS_STRING,
|
||||
@@ -347,7 +351,9 @@ class BusPassengerFunctionOrderPresenter(view: M1OrderFragment?) :
|
||||
currentSite!!.siteName!!,
|
||||
siteInfo.siteId!!.toInt(),
|
||||
siteInfo.siteName!!,
|
||||
false
|
||||
false,
|
||||
1,
|
||||
0
|
||||
)
|
||||
CallerTelematicManager.sendMsgToServer(
|
||||
OchCommonConst.BUSINESS_STRING,
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.ui.M1ContainFragment
|
||||
import com.mogo.och.common.module.manager.OCHPlanningStopSideStatusManager
|
||||
import com.mogo.och.common.module.voice.VoiceNotice
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
|
||||
class BusPassengerFunctionPresenter(view: M1ContainFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<M1ContainFragment?>(view) {
|
||||
|
||||
@@ -6,7 +6,7 @@ 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.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import com.mogo.och.bus.passenger.ui.M1SoftFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1SoftFragment
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorCallback
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
|
||||
import com.mogo.och.common.module.manager.devicemanage.data.AirconditionStatus
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import com.mogo.och.bus.passenger.ui.M1VideoFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1VideoFragment
|
||||
|
||||
class BusPassengerFunctionVideoPresenter(view: M1VideoFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<M1VideoFragment?>(view)
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.OrderInfoFragment
|
||||
|
||||
class OrderInfoPresenter(view: OrderInfoFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<OrderInfoFragment?>(view) {
|
||||
companion object{
|
||||
private const val TAG = "BusPassengerFunctionPresenter"
|
||||
}
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
super.onCreate(owner)
|
||||
}
|
||||
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
super.onDestroy(owner)
|
||||
}
|
||||
}
|
||||
@@ -1,288 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.CompoundButton
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import com.mogo.commons.mvp.MvpDialogFragment
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionPresenter
|
||||
import kotlinx.android.synthetic.main.m1_contain_fragment.*
|
||||
|
||||
/**
|
||||
* @author: yangyakun
|
||||
* @date: 2023/1/28
|
||||
*/
|
||||
class M1ContainFragment :
|
||||
MvpDialogFragment<M1ContainFragment?, BusPassengerFunctionPresenter?>() {
|
||||
|
||||
var tab: String = VIDEOTAB
|
||||
var fragmentTag: String = M1VideoFragment.TAG
|
||||
var fragment: Fragment? = null
|
||||
var isEarlyClose:Boolean = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
tab = it.getString(SELECTTAB, VIDEOTAB)
|
||||
}
|
||||
savedInstanceState?.let {
|
||||
tab = it.getString(SELECTTAB, tab)
|
||||
}
|
||||
isEarlyClose = tab==SETTINGENDORDERTAB
|
||||
setStyle(STYLE_NO_TITLE, R.style.DialogFullScreen) //dialog全屏
|
||||
}
|
||||
|
||||
private fun initFragment() {
|
||||
when (tab) {
|
||||
VIDEOTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1VideoFragment.TAG)
|
||||
?: M1VideoFragment.newInstance()
|
||||
}
|
||||
SETTINGDEVICETAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1DeviceFragment.TAG)
|
||||
?: M1DeviceFragment.newInstance()
|
||||
}
|
||||
SETTINGSOFTTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1SoftFragment.TAG)
|
||||
?: M1SoftFragment.newInstance()
|
||||
}
|
||||
SETTINGORDERTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1OrderFragment.TAG)
|
||||
?: M1OrderFragment.newInstance(object :ChangeCheck{
|
||||
override fun changeChange() {
|
||||
cb_bp_setting_device.isChecked = true
|
||||
}
|
||||
})
|
||||
}
|
||||
SETTINGENDORDERTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1EarlyEndOrderFragment.TAG)
|
||||
?: M1EarlyEndOrderFragment.newInstance(object :ContainDismiss{
|
||||
override fun closeDialog() {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
})
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
fragment?.let {
|
||||
childFragmentManager.beginTransaction()
|
||||
.replace(R.id.fl_function_group, it, fragmentTag)
|
||||
.commitNow()
|
||||
}
|
||||
cl_container.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.m1_contain_fragment
|
||||
|
||||
override fun getTagName(): String = TAG
|
||||
|
||||
override fun initViews() {
|
||||
|
||||
//dialog?.setCancelable(false)
|
||||
}
|
||||
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
dialog?.window?.let {
|
||||
BarUtils.hideStatusBarAndSticky(it)
|
||||
it.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
dialog?.setOnShowListener { _ ->
|
||||
it.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
BarUtils.hideStatusBarAndSticky(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val videoListener = CompoundButton.OnCheckedChangeListener { _, isChecked ->
|
||||
CallerLogger.d(M_BUS_P+TAG, "videoListener$isChecked")
|
||||
if (isChecked) {
|
||||
tab = VIDEOTAB
|
||||
fragmentTag = M1VideoFragment.TAG
|
||||
cb_bp_setting_soft.isChecked = false
|
||||
cb_bp_setting_device.isChecked = false
|
||||
cb_bp_setting_order.isChecked = false
|
||||
initFragment()
|
||||
}else{
|
||||
if(!cb_bp_video_player.isChecked&&
|
||||
!cb_bp_setting_soft.isChecked&&
|
||||
!cb_bp_setting_device.isChecked&&
|
||||
!cb_bp_setting_order.isChecked){
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val settingDevices = CompoundButton.OnCheckedChangeListener { _, isChecked ->
|
||||
CallerLogger.d(M_BUS_P+TAG, "settingDevices$isChecked")
|
||||
if (isChecked) {
|
||||
tab = SETTINGDEVICETAB
|
||||
fragmentTag = M1DeviceFragment.TAG
|
||||
cb_bp_setting_soft.isChecked = false
|
||||
cb_bp_video_player.isChecked = false
|
||||
cb_bp_setting_order.isChecked = false
|
||||
initFragment()
|
||||
}else{
|
||||
if(!cb_bp_video_player.isChecked&&
|
||||
!cb_bp_setting_soft.isChecked&&
|
||||
!cb_bp_setting_device.isChecked&&
|
||||
!cb_bp_setting_order.isChecked){
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private val settingSoft = CompoundButton.OnCheckedChangeListener { _, isChecked ->
|
||||
CallerLogger.d(M_BUS_P+TAG, "settingSoft$isChecked")
|
||||
if (isChecked) {
|
||||
tab = SETTINGSOFTTAB
|
||||
fragmentTag = M1SoftFragment.TAG
|
||||
cb_bp_video_player.isChecked = false
|
||||
cb_bp_setting_device.isChecked = false
|
||||
cb_bp_setting_order.isChecked = false
|
||||
initFragment()
|
||||
}else{
|
||||
if(!cb_bp_video_player.isChecked&&
|
||||
!cb_bp_setting_soft.isChecked&&
|
||||
!cb_bp_setting_device.isChecked&&
|
||||
!cb_bp_setting_order.isChecked){
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
private val settingOrder = CompoundButton.OnCheckedChangeListener { _, isChecked ->
|
||||
CallerLogger.d(M_BUS_P+TAG, "settingOrder$isChecked")
|
||||
if (isChecked) {
|
||||
if(isEarlyClose){
|
||||
tab = SETTINGENDORDERTAB
|
||||
}else{
|
||||
tab = SETTINGORDERTAB
|
||||
}
|
||||
fragmentTag = M1OrderFragment.TAG
|
||||
cb_bp_video_player.isChecked = false
|
||||
cb_bp_setting_device.isChecked = false
|
||||
cb_bp_setting_soft.isChecked = false
|
||||
initFragment()
|
||||
}else{
|
||||
if(!cb_bp_video_player.isChecked&&
|
||||
!cb_bp_setting_soft.isChecked&&
|
||||
!cb_bp_setting_device.isChecked&&
|
||||
!cb_bp_setting_order.isChecked){
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
context?.let {
|
||||
SharedPrefs.getInstance(it).putString(SELECTTAB, tab)
|
||||
}
|
||||
}
|
||||
|
||||
override fun createPresenter(): BusPassengerFunctionPresenter =
|
||||
BusPassengerFunctionPresenter(this)
|
||||
|
||||
/**
|
||||
* 重写父类show()方法
|
||||
* 避免出现java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
|
||||
*/
|
||||
override fun show(manager: FragmentManager, tag: String?) {
|
||||
try {
|
||||
var cls = this.javaClass.superclass ?: return
|
||||
while (true) {
|
||||
if (cls.name == "java.lang.Object") {
|
||||
break
|
||||
}
|
||||
cls = cls.superclass!!
|
||||
if (cls == DialogFragment::class.java) {
|
||||
break
|
||||
}
|
||||
}
|
||||
val mDismissed = cls.getDeclaredField("mDismissed")
|
||||
val mShownByMe = cls.getDeclaredField("mShownByMe")
|
||||
mDismissed.isAccessible = true
|
||||
mShownByMe.isAccessible = true
|
||||
mDismissed.setBoolean(this, false)
|
||||
mShownByMe.setBoolean(this, true)
|
||||
if (isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
return
|
||||
}
|
||||
val ft: FragmentTransaction = manager.beginTransaction()
|
||||
ft.add(this, tag)
|
||||
ft.commitAllowingStateLoss()
|
||||
} catch (e: Exception) {
|
||||
Log.e("DialogFragment", "show", e.fillInStackTrace())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewStateRestored(savedInstanceState: Bundle?) {
|
||||
CallerLogger.d(M_BUS_P+TAG, "onViewStateRestored")
|
||||
cb_bp_video_player.setOnCheckedChangeListener(null)
|
||||
cb_bp_setting_soft.setOnCheckedChangeListener(null)
|
||||
cb_bp_setting_device.setOnCheckedChangeListener(null)
|
||||
cb_bp_setting_order.setOnCheckedChangeListener(null)
|
||||
cb_bp_video_player.isChecked = false
|
||||
cb_bp_setting_soft.isChecked = false
|
||||
cb_bp_setting_device.isChecked = false
|
||||
cb_bp_setting_order.isChecked = false
|
||||
cb_bp_video_player.setOnCheckedChangeListener(videoListener)
|
||||
cb_bp_setting_soft.setOnCheckedChangeListener(settingSoft)
|
||||
cb_bp_setting_device.setOnCheckedChangeListener(settingDevices)
|
||||
cb_bp_setting_order.setOnCheckedChangeListener(settingOrder)
|
||||
|
||||
when (tab) {
|
||||
VIDEOTAB -> cb_bp_video_player.isChecked = true
|
||||
SETTINGDEVICETAB -> cb_bp_setting_device.isChecked = true
|
||||
SETTINGSOFTTAB -> cb_bp_setting_soft.isChecked = true
|
||||
SETTINGORDERTAB -> cb_bp_setting_order.isChecked = true
|
||||
SETTINGENDORDERTAB -> cb_bp_setting_order.isChecked = true
|
||||
else -> {}
|
||||
}
|
||||
super.onViewStateRestored(savedInstanceState)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionFragment"
|
||||
|
||||
const val VIDEOTAB = "VideoTab"
|
||||
const val SETTINGSOFTTAB = "SettingSoftTab"
|
||||
const val SETTINGDEVICETAB = "SettingDeviceTab"
|
||||
const val SETTINGORDERTAB = "SettingOrderTab"
|
||||
const val SETTINGENDORDERTAB = "SettingEndOrderTab"
|
||||
|
||||
const val SELECTTAB = "SELECTTAB"
|
||||
|
||||
@JvmStatic
|
||||
fun newInstance(): M1ContainFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1ContainFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
interface ContainDismiss{
|
||||
fun closeDialog()
|
||||
}
|
||||
interface ChangeCheck{
|
||||
fun changeChange()
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionDevicePresenter
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
import kotlinx.android.synthetic.main.m1_devices_fragment.*
|
||||
|
||||
/**
|
||||
* @author: yangyakun
|
||||
* @date: 2023/1/28
|
||||
*/
|
||||
class M1DeviceFragment :
|
||||
MvpFragment<M1DeviceFragment?, BusPassengerFunctionDevicePresenter?>() {
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.m1_devices_fragment
|
||||
|
||||
override fun getTagName(): String = TAG
|
||||
|
||||
override fun initViews() {
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
|
||||
}
|
||||
|
||||
override fun createPresenter(): BusPassengerFunctionDevicePresenter =
|
||||
BusPassengerFunctionDevicePresenter(this)
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionDeviceFragment"
|
||||
@JvmStatic
|
||||
fun newInstance(): M1DeviceFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1DeviceFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionEarlyEndOrderPresenter
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
import kotlinx.android.synthetic.main.m1_order_early_end.*
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,32 +1,26 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
|
||||
import android.graphics.BitmapFactory
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.View.OnClickListener
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.amap.api.maps.model.LatLng
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.MMsgBoxButtonView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
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.AppStateManager
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.common.module.voice.VoiceManager
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerPresenter
|
||||
import com.mogo.och.bus.passenger.utils.VoiceFocusManager
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1CarUserNoOrderFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
import kotlinx.android.synthetic.main.m1_main_fragment.*
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
@@ -52,34 +46,6 @@ class MainFragment :
|
||||
}
|
||||
|
||||
override fun initViews() {
|
||||
cb_bp_video_player.onClick {
|
||||
openSettingPage(M1ContainFragment.VIDEOTAB)
|
||||
}
|
||||
cb_bp_setting_soft.onClick {
|
||||
openSettingPage(M1ContainFragment.SETTINGSOFTTAB)
|
||||
}
|
||||
cb_bp_setting_device.onClick {
|
||||
openSettingPage(M1ContainFragment.SETTINGDEVICETAB)
|
||||
}
|
||||
cb_bp_setting_order.onClick {
|
||||
if (LoginStatusManager.isLogin()) {
|
||||
openSettingPage(M1ContainFragment.SETTINGORDERTAB)
|
||||
}else{
|
||||
ToastUtils.showShort(AbsMogoApplication.getApp().getString(R.string.m1_please_login_driver))
|
||||
}
|
||||
}
|
||||
iv_end_order.onClick {
|
||||
if (LoginStatusManager.isLogin()) {
|
||||
if(mPresenter?.haveOrder()==true){
|
||||
openSettingPage(M1ContainFragment.SETTINGENDORDERTAB)
|
||||
}else{
|
||||
ToastUtils.showShort("没有订单无法结束订单")
|
||||
}
|
||||
}else{
|
||||
ToastUtils.showShort(AbsMogoApplication.getApp().getString(R.string.m1_please_login_driver))
|
||||
}
|
||||
}
|
||||
|
||||
viewBusPM1MsgBoxButton.setClickListener(object : MMsgBoxButtonView.ClickListener {
|
||||
override fun showMsgBoxList(show: Boolean) {
|
||||
if (show) {
|
||||
@@ -94,6 +60,19 @@ class MainFragment :
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
bb_boorombar.setSettingClickListener{
|
||||
openSettingPage(M1ContainFragment.SETTINGSOFTTAB)
|
||||
}
|
||||
bb_boorombar.setOrderInfoClickListener{
|
||||
openSettingPage(M1ContainFragment.ORDERINFO)
|
||||
}
|
||||
bb_boorombar.setLineClickListener{
|
||||
openSettingPage(M1ContainFragment.SELECTLINE)
|
||||
}
|
||||
aciv_enter_video.setOnClickListener{
|
||||
openSettingPage(M1ContainFragment.VIDEOTAB)
|
||||
}
|
||||
}
|
||||
|
||||
private fun openSettingPage(tab: String) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
@@ -102,7 +102,7 @@ class M1CarUserNoOrderFragment :
|
||||
}
|
||||
|
||||
override fun onViewStateRestored(savedInstanceState: Bundle?) {
|
||||
CallerLogger.d(M_BUS_P+TAG, "onViewStateRestored")
|
||||
CallerLogger.d(M_BUS_P+ TAG, "onViewStateRestored")
|
||||
super.onViewStateRestored(savedInstanceState)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.DialogFragment
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import androidx.fragment.app.FragmentTransaction
|
||||
import com.mogo.commons.mvp.MvpDialogFragment
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionPresenter
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1OrderLineFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1SoftFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1VideoFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.OrderInfoFragment
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomBar
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
|
||||
import kotlinx.android.synthetic.main.m1_contain_fragment.*
|
||||
|
||||
/**
|
||||
* @author: yangyakun
|
||||
* @date: 2023/1/28
|
||||
*/
|
||||
class M1ContainFragment :
|
||||
MvpDialogFragment<M1ContainFragment?, BusPassengerFunctionPresenter?>() {
|
||||
|
||||
var tab: String = VIDEOTAB
|
||||
var fragmentTag: String = M1VideoFragment.TAG
|
||||
var fragment: Fragment? = null
|
||||
|
||||
var videoFragment:M1VideoFragment? = null
|
||||
var softFragment:M1SoftFragment? = null
|
||||
var orderInfoFragment:OrderInfoFragment? = null
|
||||
var orderLineFragment:M1OrderLineFragment? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
CallerLogger.d(M_BUS_P+ TAG, "onCreate")
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
tab = it.getString(SELECTTAB, VIDEOTAB)
|
||||
}
|
||||
savedInstanceState?.let {
|
||||
tab = it.getString(SELECTTAB, tab)
|
||||
}
|
||||
setStyle(STYLE_NO_TITLE, R.style.DialogFullScreen) //dialog全屏
|
||||
}
|
||||
|
||||
private fun setCheckView() {
|
||||
CallerLogger.d(M_BUS_P+ TAG, "setCheckView")
|
||||
when (tab) {
|
||||
VIDEOTAB -> {
|
||||
fragment =videoFragment
|
||||
?: childFragmentManager.findFragmentByTag(M1VideoFragment.TAG)
|
||||
?: M1VideoFragment.newInstance()
|
||||
if(videoFragment==null&&fragment is M1VideoFragment){
|
||||
videoFragment = fragment as M1VideoFragment
|
||||
}
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.VIDEO)
|
||||
cl_container.setBackgroundResource(R.drawable.m1_function_bg)
|
||||
fragmentTag = M1VideoFragment.TAG
|
||||
}
|
||||
SETTINGSOFTTAB -> {
|
||||
fragment =softFragment
|
||||
?: childFragmentManager.findFragmentByTag(M1SoftFragment.TAG)
|
||||
?: M1SoftFragment.newInstance()
|
||||
if(softFragment==null&&fragment is M1SoftFragment){
|
||||
softFragment = fragment as M1SoftFragment
|
||||
}
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.SETTING)
|
||||
cl_container.setBackgroundResource(R.drawable.m1_function_bg)
|
||||
fragmentTag = M1SoftFragment.TAG
|
||||
}
|
||||
ORDERINFO -> {
|
||||
fragment =orderInfoFragment
|
||||
?: childFragmentManager.findFragmentByTag(OrderInfoFragment.TAG)
|
||||
?: OrderInfoFragment.newInstance()
|
||||
if(orderInfoFragment==null&&fragment is OrderInfoFragment){
|
||||
orderInfoFragment = fragment as OrderInfoFragment
|
||||
}
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.ORDERINFO)
|
||||
cl_container.background = null
|
||||
fragmentTag = OrderInfoFragment.TAG
|
||||
}
|
||||
SELECTLINE ->{
|
||||
fragment =orderLineFragment
|
||||
?: childFragmentManager.findFragmentByTag(M1OrderLineFragment.TAG)
|
||||
?: M1OrderLineFragment.newInstance()
|
||||
if(orderLineFragment==null&&fragment is M1OrderLineFragment){
|
||||
orderLineFragment = fragment as M1OrderLineFragment
|
||||
}
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.LINE)
|
||||
cl_container.background = null
|
||||
fragmentTag = M1OrderLineFragment.TAG
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
CallerLogger.d(M_BUS_P+ TAG, "fragment:$fragment")
|
||||
|
||||
fragment?.let {
|
||||
val beginTransaction = childFragmentManager.beginTransaction()
|
||||
if(!it.isAdded){
|
||||
beginTransaction.add(it,fragmentTag)
|
||||
}
|
||||
beginTransaction
|
||||
.replace(R.id.fl_function_group, it, fragmentTag)
|
||||
.commitNow()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.m1_contain_fragment
|
||||
|
||||
override fun getTagName(): String = TAG
|
||||
|
||||
override fun initViews() {
|
||||
|
||||
//dialog?.setCancelable(false)
|
||||
CallerLogger.d(M_BUS_P+ TAG, "initViews")
|
||||
setCheckView()
|
||||
cl_container.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
bb_bottom_bar.setSettingClickListener{
|
||||
CallerLogger.d(M_BUS_P+ TAG, "initViews---$tab")
|
||||
if(tab==SETTINGSOFTTAB) {
|
||||
dismissAllowingStateLoss()
|
||||
}else{
|
||||
tab = SETTINGSOFTTAB
|
||||
setCheckView()
|
||||
}
|
||||
}
|
||||
bb_bottom_bar.setLineClickListener{
|
||||
CallerLogger.d(M_BUS_P+ TAG, "initViews---$tab")
|
||||
if(tab==SELECTLINE) {
|
||||
dismissAllowingStateLoss()
|
||||
}else{
|
||||
tab = SELECTLINE
|
||||
setCheckView()
|
||||
}
|
||||
}
|
||||
bb_bottom_bar.setOrderInfoClickListener{
|
||||
CallerLogger.d(M_BUS_P+ TAG, "initViews---$tab")
|
||||
if(tab==ORDERINFO) {
|
||||
dismissAllowingStateLoss()
|
||||
}else{
|
||||
tab = ORDERINFO
|
||||
setCheckView()
|
||||
}
|
||||
}
|
||||
bb_bottom_bar.setApplyClickListener(object : BottomClickView.ApplyClickLintener{
|
||||
override fun onApplyClick() {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
CallerLogger.d(M_BUS_P+ TAG, "onViewCreated")
|
||||
dialog?.window?.let {
|
||||
BarUtils.hideStatusBarAndSticky(it)
|
||||
it.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
dialog?.setOnShowListener { _ ->
|
||||
it.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
|
||||
BarUtils.hideStatusBarAndSticky(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
CallerLogger.d(M_BUS_P+ TAG, "onSaveInstanceState")
|
||||
context?.let {
|
||||
SharedPrefs.getInstance(it).putString(SELECTTAB, tab)
|
||||
}
|
||||
}
|
||||
|
||||
override fun createPresenter(): BusPassengerFunctionPresenter =
|
||||
BusPassengerFunctionPresenter(this)
|
||||
|
||||
/**
|
||||
* 重写父类show()方法
|
||||
* 避免出现java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
|
||||
*/
|
||||
override fun show(manager: FragmentManager, tag: String?) {
|
||||
try {
|
||||
var cls = this.javaClass.superclass ?: return
|
||||
while (true) {
|
||||
if (cls.name == "java.lang.Object") {
|
||||
break
|
||||
}
|
||||
cls = cls.superclass!!
|
||||
if (cls == DialogFragment::class.java) {
|
||||
break
|
||||
}
|
||||
}
|
||||
val mDismissed = cls.getDeclaredField("mDismissed")
|
||||
val mShownByMe = cls.getDeclaredField("mShownByMe")
|
||||
mDismissed.isAccessible = true
|
||||
mShownByMe.isAccessible = true
|
||||
mDismissed.setBoolean(this, false)
|
||||
mShownByMe.setBoolean(this, true)
|
||||
if (isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
return
|
||||
}
|
||||
val ft: FragmentTransaction = manager.beginTransaction()
|
||||
ft.add(this, tag)
|
||||
ft.commitAllowingStateLoss()
|
||||
} catch (e: Exception) {
|
||||
Log.e("DialogFragment", "show", e.fillInStackTrace())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewStateRestored(savedInstanceState: Bundle?) {
|
||||
CallerLogger.d(M_BUS_P+ TAG, "onViewStateRestored")
|
||||
when (tab) {
|
||||
VIDEOTAB -> {
|
||||
|
||||
}
|
||||
SETTINGSOFTTAB -> {}
|
||||
ORDERINFO -> {}
|
||||
SELECTLINE -> {}
|
||||
else -> {}
|
||||
}
|
||||
super.onViewStateRestored(savedInstanceState)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionFragment"
|
||||
|
||||
/**
|
||||
* 娱乐视频
|
||||
*/
|
||||
const val VIDEOTAB = "VideoTab"
|
||||
|
||||
/**
|
||||
* 空调、暖风、灯和剩余设置
|
||||
*/
|
||||
const val SETTINGSOFTTAB = "SettingSoftTab"
|
||||
|
||||
/**
|
||||
* 订单信息
|
||||
*/
|
||||
const val ORDERINFO = "OrderInfo"
|
||||
|
||||
/**
|
||||
* 选择线路
|
||||
*/
|
||||
const val SELECTLINE = "SelectLine"
|
||||
|
||||
|
||||
|
||||
const val SELECTTAB = "SELECTTAB"
|
||||
|
||||
@JvmStatic
|
||||
fun newInstance(): M1ContainFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1ContainFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
interface ContainDismiss{
|
||||
fun closeDialog()
|
||||
}
|
||||
interface ChangeCheck{
|
||||
fun changeChange()
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment.fragment
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.os.Bundle
|
||||
@@ -19,6 +19,7 @@ import com.mogo.och.bus.passenger.model.OrderStatusEnum
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionOrderPresenter
|
||||
import com.mogo.och.bus.passenger.ui.adapter.OrderLineItemAdapter
|
||||
import com.mogo.och.bus.passenger.ui.adapter.OrderSiteItemAdapter
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
import com.mogo.och.bus.passenger.view.BottomDecoration
|
||||
import kotlinx.android.synthetic.main.m1_order_fragment.*
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
@@ -27,8 +28,8 @@ import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
* @author: yangyakun
|
||||
* @date: 2023/1/28
|
||||
*/
|
||||
class M1OrderFragment :
|
||||
MvpFragment<M1OrderFragment?, BusPassengerFunctionOrderPresenter?>() {
|
||||
class M1OrderLineFragment :
|
||||
MvpFragment<M1OrderLineFragment?, BusPassengerFunctionOrderPresenter?>() {
|
||||
|
||||
private var changeCheck: M1ContainFragment.ChangeCheck? = null
|
||||
|
||||
@@ -242,14 +243,13 @@ class M1OrderFragment :
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionOrderFragment"
|
||||
const val TAG = "M1OrderLineFragment"
|
||||
|
||||
@JvmStatic
|
||||
fun newInstance(changeCheck: M1ContainFragment.ChangeCheck): M1OrderFragment {
|
||||
fun newInstance(): M1OrderLineFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1OrderFragment()
|
||||
val fragment = M1OrderLineFragment()
|
||||
fragment.arguments = args
|
||||
fragment.changeCheck = changeCheck
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment.fragment
|
||||
|
||||
import android.animation.ObjectAnimator
|
||||
import android.animation.ValueAnimator
|
||||
@@ -711,7 +711,7 @@ class M1SoftFragment :
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionSoftFragment"
|
||||
const val TAG = "M1SoftFragment"
|
||||
const val touchTagKey = 2
|
||||
const val touchTag = 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.mogo.och.bus.passenger.ui
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
@@ -152,7 +152,7 @@ class M1VideoFragment :
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionVideoFragment"
|
||||
const val TAG = "M1VideoFragment"
|
||||
@JvmStatic
|
||||
fun newInstance(): M1VideoFragment {
|
||||
val args = Bundle()
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.OrderInfoPresenter
|
||||
|
||||
/**
|
||||
* @author: yangyakun
|
||||
* @date: 2023/1/28
|
||||
*/
|
||||
class OrderInfoFragment :
|
||||
MvpFragment<OrderInfoFragment?, OrderInfoPresenter?>() {
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.m1_devices_fragment
|
||||
|
||||
override fun getTagName(): String = TAG
|
||||
|
||||
override fun initViews() {
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
|
||||
}
|
||||
|
||||
override fun createPresenter(): OrderInfoPresenter =
|
||||
OrderInfoPresenter(this)
|
||||
|
||||
companion object {
|
||||
const val TAG = "OrderInfoFragment"
|
||||
@JvmStatic
|
||||
fun newInstance(): OrderInfoFragment {
|
||||
val args = Bundle()
|
||||
val fragment = OrderInfoFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.main.m1_bottom_bar.view.*
|
||||
|
||||
class BottomBar @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
init {
|
||||
isClickable = true
|
||||
LayoutInflater.from(context).inflate(R.layout.m1_bottom_bar, this, true)
|
||||
setBackgroundResource(R.drawable.charter_p_bottom_bar_bg)
|
||||
}
|
||||
|
||||
private var checkIndex = SelectView.VIDEO
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
}
|
||||
fun setOrderInfoClickListener(click:OnClickListener){
|
||||
cl_order_time.setOnClickListener(click)
|
||||
}
|
||||
fun setSettingClickListener(click:OnClickListener){
|
||||
actv_setting.setOnClickListener(click)
|
||||
}
|
||||
fun setLineClickListener(click:OnClickListener){
|
||||
actv_line.setOnClickListener(click)
|
||||
}
|
||||
|
||||
fun setApplyClickListener(click:BottomClickView.ApplyClickLintener){
|
||||
aciv_center_image.applyClickListener=click
|
||||
actv_stop_site.applyClickListener=click
|
||||
actv_close_door.applyClickListener=click
|
||||
actv_open_door.applyClickListener=click
|
||||
}
|
||||
|
||||
fun setCheckIndex(index:SelectView){
|
||||
if(checkIndex==index){
|
||||
return
|
||||
}
|
||||
checkIndex = index
|
||||
if(checkIndex == SelectView.ORDERINFO){
|
||||
cl_order_time_press.visibility = VISIBLE
|
||||
actv_order_end_time.setTextColor(context.getColor(android.R.color.white))
|
||||
actv_order_end_time_title.setTextColor(context.getColor(android.R.color.white))
|
||||
}else{
|
||||
cl_order_time_press.visibility = GONE
|
||||
actv_order_end_time.setTextColor(context.getColor(R.color.bus_p_m1_0050E1))
|
||||
actv_order_end_time_title.setTextColor(context.getColor(R.color.bus_p_m1_090f28))
|
||||
}
|
||||
if(checkIndex == SelectView.SETTING){
|
||||
actv_setting.setCheckItem(true)
|
||||
}else{
|
||||
actv_setting.setCheckItem(false)
|
||||
}
|
||||
if(checkIndex == SelectView.LINE){
|
||||
actv_line.setCheckItem(true)
|
||||
}else{
|
||||
actv_line.setCheckItem(false)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum class SelectView{
|
||||
ORDERINFO,SETTING,LINE,VIDEO
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import kotlinx.android.synthetic.main.m1_bottom_stop_site.view.*
|
||||
|
||||
open class BottomCheckView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "StopSiteView"
|
||||
}
|
||||
|
||||
private var backageViewId: Int = -1
|
||||
private var bottomTitle: String = ""
|
||||
private var selectedDrawable: Int = -1
|
||||
private var normalDrawable: Int = -1
|
||||
private var backageView: View? = null
|
||||
|
||||
private var isCheck = false
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.m1_bottom_stop_site, this, true)
|
||||
try {
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.BottomSelectView)
|
||||
backageViewId = typedArray.getResourceId(R.styleable.BottomSelectView_backageViewId, -1)
|
||||
bottomTitle = typedArray.getString(R.styleable.BottomSelectView_bottomTitle) ?: ""
|
||||
selectedDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_selectedDrawable, -1)
|
||||
normalDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_normalDrawable, -1)
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
if (selectedDrawable > 0) {
|
||||
aciv_center_image.setImageResource(normalDrawable)
|
||||
}
|
||||
actv_title.text = bottomTitle
|
||||
}
|
||||
|
||||
fun setCheckItem(isCheck: Boolean) {
|
||||
if (isCheck != this.isCheck) {
|
||||
this.isCheck = isCheck
|
||||
notifiBackageView()
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifiBackageView() {
|
||||
if (isCheck) {
|
||||
backageView?.visibility = View.VISIBLE
|
||||
aciv_center_image.setImageResource(selectedDrawable)
|
||||
actv_title.setTextColor(context.getColor(android.R.color.white))
|
||||
} else {
|
||||
backageView?.visibility = View.GONE
|
||||
aciv_center_image.setImageResource(normalDrawable)
|
||||
actv_title.setTextColor(context.getColor(R.color.bus_p_m1_090f28))
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
parent?.let {
|
||||
if (parent is ConstraintLayout) {
|
||||
if (backageViewId > 0) {
|
||||
backageView = (parent as ConstraintLayout).findViewById(backageViewId)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isCheck) {
|
||||
backageView?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
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
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
import kotlinx.android.synthetic.main.m1_bottom_stop_site.view.*
|
||||
|
||||
open class BottomClickView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "StopSiteView"
|
||||
}
|
||||
|
||||
private var backageViewId: Int = -1
|
||||
private var bottomTitle: String = ""
|
||||
private var selectedDrawable: Int = -1
|
||||
private var normalDrawable: Int = -1
|
||||
private var backageView: View? = null
|
||||
|
||||
var applyClickListener:ApplyClickLintener?=null
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.m1_bottom_stop_site, this, true)
|
||||
try {
|
||||
val typedArray = context.obtainStyledAttributes(attrs, R.styleable.BottomSelectView)
|
||||
backageViewId = typedArray.getResourceId(R.styleable.BottomSelectView_backageViewId, -1)
|
||||
bottomTitle = typedArray.getString(R.styleable.BottomSelectView_bottomTitle) ?: ""
|
||||
selectedDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_selectedDrawable, -1)
|
||||
normalDrawable = typedArray.getResourceId(R.styleable.BottomSelectView_normalDrawable, -1)
|
||||
typedArray.recycle()
|
||||
initView(context)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
if (selectedDrawable > 0) {
|
||||
aciv_center_image.setImageResource(normalDrawable)
|
||||
}
|
||||
actv_title.text = bottomTitle
|
||||
setOnTouchListener(object : OnTouchListener {
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
||||
when (event?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "ACTION_DOWN")
|
||||
if (selectedDrawable > 0) {
|
||||
aciv_center_image.setImageResource(selectedDrawable)
|
||||
actv_title.setTextColor(context.getColor(android.R.color.white))
|
||||
backageView?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "ACTION_UP")
|
||||
if (selectedDrawable > 0) {
|
||||
aciv_center_image.setImageResource(normalDrawable)
|
||||
actv_title.setTextColor(context.getColor(R.color.bus_p_m1_090f28))
|
||||
backageView?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
MotionEvent.ACTION_CANCEL -> {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "ACTION_CANCEL")
|
||||
if (selectedDrawable > 0) {
|
||||
aciv_center_image.setImageResource(normalDrawable)
|
||||
actv_title.setTextColor(context.getColor(R.color.bus_p_m1_090f28))
|
||||
backageView?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
return false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
parent?.let {
|
||||
if (parent is ConstraintLayout) {
|
||||
if (backageViewId > 0) {
|
||||
backageView = (parent as ConstraintLayout).findViewById(backageViewId)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ApplyClickLintener{
|
||||
fun onApplyClick()
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.door
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom.impl
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
|
||||
import com.mogo.och.common.module.utils.RxUtils
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorStatusManager
|
||||
@@ -17,16 +19,17 @@ class CloseDoorView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : AppCompatTextView(context, attrs, defStyleAttr) {
|
||||
) : BottomClickView(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
setOnClickListener {
|
||||
go2OpenDoor()
|
||||
applyClickListener?.onApplyClick()
|
||||
}
|
||||
}
|
||||
|
||||
private fun go2OpenDoor(){
|
||||
LightAirconditionDoorManager.go2OpenDoor(false)
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,23 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.stopsite
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom.impl
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_BUS_P
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.model.CharterPassengerModel
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
import kotlinx.android.synthetic.main.m1_bottom_bar.view.*
|
||||
|
||||
class GoView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
@@ -17,9 +25,38 @@ class GoView @JvmOverloads constructor(
|
||||
defStyleAttr: Int = 0
|
||||
) : AppCompatTextView(context, attrs, defStyleAttr) {
|
||||
|
||||
var applyClickListener: BottomClickView.ApplyClickLintener?=null
|
||||
|
||||
companion object{
|
||||
private const val TAG = "GoView"
|
||||
}
|
||||
|
||||
init {
|
||||
setBackgroundResource(R.drawable.charter_p_bottom_center_normal)
|
||||
setOnTouchListener(object :OnTouchListener{
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onTouch(v: View?, event: MotionEvent?): Boolean {
|
||||
when (event?.action) {
|
||||
MotionEvent.ACTION_DOWN -> {
|
||||
CallerLogger.d(M_BUS_P + TAG, "ACTION_DOWN")
|
||||
setBackgroundResource(R.drawable.charter_p_bottom_center_press)
|
||||
}
|
||||
MotionEvent.ACTION_UP -> {
|
||||
CallerLogger.d(M_BUS_P + TAG, "ACTION_UP")
|
||||
setBackgroundResource(R.drawable.charter_p_bottom_center_normal)
|
||||
}
|
||||
MotionEvent.ACTION_CANCEL -> {
|
||||
CallerLogger.d(M_BUS_P + TAG, "ACTION_CANCEL")
|
||||
setBackgroundResource(R.drawable.charter_p_bottom_center_normal)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
return false
|
||||
}
|
||||
})
|
||||
setOnClickListener {
|
||||
startGo()
|
||||
applyClickListener?.onApplyClick()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +82,6 @@ class GoView @JvmOverloads constructor(
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.door
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom.impl
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import com.mogo.eagle.core.utilcode.util.ActivityUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
|
||||
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
|
||||
@@ -11,17 +13,18 @@ class OpenDoorView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : AppCompatTextView(context, attrs, defStyleAttr) {
|
||||
) : BottomClickView(context, attrs, defStyleAttr) {
|
||||
|
||||
init {
|
||||
setOnClickListener {
|
||||
go2OpenDoor()
|
||||
applyClickListener?.onApplyClick()
|
||||
}
|
||||
}
|
||||
|
||||
private fun go2OpenDoor(){
|
||||
LightAirconditionDoorManager.go2OpenDoor(true)
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,24 +1,37 @@
|
||||
package com.mogo.och.bus.passenger.ui.view.stopsite
|
||||
package com.mogo.och.bus.passenger.ui.view.bottom.impl
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
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
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.ui.view.bottom.BottomClickView
|
||||
import com.mogo.och.common.module.utils.SoundPoolHelper
|
||||
|
||||
class StopSiteView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : AppCompatTextView(context, attrs, defStyleAttr) {
|
||||
) : BottomClickView(context, attrs, defStyleAttr) {
|
||||
|
||||
companion object{
|
||||
private const val TAG = "StopSiteView"
|
||||
}
|
||||
|
||||
init {
|
||||
setOnClickListener {
|
||||
stopSite()
|
||||
applyClickListener?.onApplyClick()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +52,6 @@ class StopSiteView @JvmOverloads constructor(
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
|
||||
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 511 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 8.3 KiB |
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/charter_p_bottom_center_press" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/charter_p_bottom_center_normal" android:state_pressed="false"/>
|
||||
<item android:drawable="@drawable/charter_p_bottom_center_normal"/>
|
||||
</selector>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:drawable="@drawable/charter_p_bottom_opendoor_normal_nor_src" android:gravity="center"
|
||||
android:width="@dimen/dp_90"
|
||||
android:height="@dimen/dp_90"/>
|
||||
</layer-list >
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item
|
||||
android:drawable="@drawable/charter_p_bottom_opendoor_normal_press_src" android:gravity="center"
|
||||
android:width="@dimen/dp_90"
|
||||
android:height="@dimen/dp_90"/>
|
||||
</layer-list >
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/charter_p_bottom_opendoor_press" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/charter_p_bottom_opendoor_normal" android:state_pressed="false"/>
|
||||
<item android:drawable="@drawable/charter_p_bottom_opendoor_normal"/>
|
||||
</selector>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_39"/>
|
||||
<gradient android:startColor="@color/bus_p_m1_1466FB" android:endColor="@color/bus_p_m1_43CEFE"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_39"/>
|
||||
<solid android:color="@color/bus_p_m1_9aabd2"/>
|
||||
</shape>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@dimen/dp_36"/>
|
||||
<solid android:color="@color/bus_p_m1_f0e0efff"/>
|
||||
</shape>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/m1_order_closedoor_press" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/m1_order_closedoor_normal" android:state_pressed="false"/>
|
||||
<item android:drawable="@drawable/m1_order_closedoor_normal"/>
|
||||
<item android:drawable="@drawable/charter_p_order_closedoor_press" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/charter_p_order_closedoor_normal" android:state_pressed="false"/>
|
||||
<item android:drawable="@drawable/charter_p_order_closedoor_normal"/>
|
||||
</selector>
|
||||
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_107"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.impl.GoView
|
||||
android:id="@+id/aciv_center_image"
|
||||
android:text="出发"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/dp_48"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="@dimen/dp_489"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_stop_site_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/charter_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_stop_site"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_stop_site"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.impl.StopSiteView
|
||||
android:id="@+id/actv_stop_site"
|
||||
app:backageViewId="@+id/actv_stop_site_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_stopsite_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_stopsite_normal"
|
||||
app:bottomTitle="靠边停车"
|
||||
app:layout_constraintStart_toEndOf="@+id/aciv_center_image"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_close_door"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_close_door_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/charter_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_close_door"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_close_door"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.impl.CloseDoorView
|
||||
android:id="@+id/actv_close_door"
|
||||
app:backageViewId="@+id/actv_close_door_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_closedoor_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_closedoor_normal"
|
||||
app:bottomTitle="关车门"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_stop_site"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_open_door"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_open_door_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/charter_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_open_door"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_open_door"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.impl.OpenDoorView
|
||||
android:id="@+id/actv_open_door"
|
||||
android:gravity="center"
|
||||
app:backageViewId="@+id/actv_open_door_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_opendoor_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_opendoor_normal"
|
||||
app:bottomTitle="开车门"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_close_door"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/cl_order_time_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/charter_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/cl_order_time"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cl_order_time"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_order_time"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_setting"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="spread"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_null"
|
||||
android:text="订单空空~"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textColor="@color/bus_p_m1_090f28"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_end_time"
|
||||
android:text="08:15"
|
||||
android:textSize="@dimen/dp_60"
|
||||
android:textColor="@color/bus_p_m1_0050E1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_end_time_title"
|
||||
android:text="剩余包车时长"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:textColor="@color/bus_p_m1_090f28"
|
||||
android:layout_marginBottom="@dimen/dp_7_5"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/clg_order_info"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="actv_order_end_time,actv_order_end_time_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_setting_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/charter_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_setting"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_setting"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
|
||||
android:id="@+id/actv_setting"
|
||||
app:backageViewId="@+id/actv_setting_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_softsettiing_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_softsettiing_normal"
|
||||
app:bottomTitle="设置"
|
||||
app:bottomClick="false"
|
||||
app:layout_constraintStart_toEndOf="@+id/cl_order_time"
|
||||
app:layout_constraintEnd_toStartOf="@+id/actv_line"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/actv_line_press"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/charter_bottom_bar_select_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/actv_line"
|
||||
app:layout_constraintEnd_toEndOf="@+id/actv_line"
|
||||
android:layout_width="@dimen/dp_359"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomCheckView
|
||||
android:id="@+id/actv_line"
|
||||
app:backageViewId="@+id/actv_line_press"
|
||||
app:selectedDrawable="@drawable/charter_p_bottom_line_press"
|
||||
app:normalDrawable="@drawable/charter_p_bottom_line_normal"
|
||||
app:bottomTitle="线路"
|
||||
app:bottomClick="false"
|
||||
app:layout_constraintStart_toEndOf="@+id/actv_setting"
|
||||
app:layout_constraintEnd_toStartOf="@+id/aciv_center_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</merge>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_107"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_center_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="@dimen/dp_90"
|
||||
android:layout_height="@dimen/dp_90"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_title"
|
||||
app:layout_constraintStart_toStartOf="@+id/aciv_center_image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/aciv_center_image"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_9_5"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:text="靠边停车"
|
||||
android:textColor="@color/bus_p_m1_090f28"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</merge>
|
||||
@@ -3,57 +3,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/cl_container"
|
||||
android:background="@drawable/m1_function_bg"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_function_group"
|
||||
app:layout_constraintBottom_toTopOf="@+id/cb_bp_video_player"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bb_bottom_bar"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_34_5"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_bp_video_player"
|
||||
android:background="@drawable/bus_p_function_bottom_information_bg_selector"
|
||||
android:button="@null"
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomBar
|
||||
android:id="@+id/bb_bottom_bar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cb_bp_setting_soft"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_bp_setting_soft"
|
||||
android:background="@drawable/bus_p_function_bottom_soft_bg_selector"
|
||||
android:button="@null"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_video_player"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cb_bp_setting_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_bp_setting_device"
|
||||
android:background="@drawable/bus_p_function_bottom_device_bg_selector"
|
||||
android:button="@null"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cb_bp_setting_order"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_setting_soft"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_bp_setting_order"
|
||||
android:background="@drawable/bus_p_function_bottom_order_bg_selector"
|
||||
android:button="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_setting_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -6,77 +6,140 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:clickable="true"
|
||||
android:background="@drawable/bus_p_function_setting_soft_b_shape"
|
||||
android:background="@drawable/charter_p_shape_order_info"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="431:110"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.4589">
|
||||
android:clickable="true"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_width="@dimen/dp_327"
|
||||
android:layout_height="@dimen/dp_270">
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.stopsite.GoView
|
||||
android:id="@+id/tv_car_setting_go"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:drawableTop="@drawable/bus_p_function_device_go_press_selecor"
|
||||
android:gravity="center"
|
||||
android:text="出发"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_car_setting_stopside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_phone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.492" />
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.stopsite.StopSiteView
|
||||
android:id="@+id/tv_car_setting_stopside"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:drawableTop="@drawable/bus_p_function_device_stopside_press_selecor"
|
||||
android:gravity="center"
|
||||
android:text="靠边停车"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_33"
|
||||
android:text="18811539480"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_car_setting_opendoor"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_car_setting_go"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.door.CloseDoorView
|
||||
android:id="@+id/tv_car_setting_opendoor"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:drawableTop="@drawable/bus_p_function_device_opendoor_press_selecor"
|
||||
android:gravity="center"
|
||||
android:text="开车门"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_car_setting_closedoor"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_car_setting_stopside"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.door.OpenDoorView
|
||||
android:id="@+id/tv_car_setting_closedoor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:drawableTop="@drawable/bus_p_function_device_closedoor_press_selecor"
|
||||
android:gravity="center"
|
||||
android:text="关车门"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:textSize="@dimen/dp_28"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_times"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_car_setting_opendoor"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_marginTop="@dimen/dp_31"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_phone"
|
||||
android:text="09:00-18:00"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textColor="@color/bus_p_m1_0050E1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_times_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_times"
|
||||
android:text="用车时间"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:textColor="@color/bus_p_m1_112b57"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_end_order"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_times_title"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_27"
|
||||
android:background="@drawable/charter_p_shape_end_order"
|
||||
android:gravity="center"
|
||||
android:text="结束用车"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:paddingEnd="@dimen/dp_42"
|
||||
android:paddingStart="@dimen/dp_42"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_13"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:background="@drawable/charter_p_shape_order_info"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_270">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:text="剩余时间 02:37"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:textColor="@color/bus_p_m1_5F7096"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_33"
|
||||
android:layout_marginEnd="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_end_order_content"
|
||||
android:text="要提前说再见了吗?蘑菇小助手很舍不得您呢!"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textColor="@color/bus_p_m1_112b57"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_92"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:text="结束用车"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
|
||||
android:background="@drawable/charter_p_shape_end_order_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_13"
|
||||
android:paddingStart="@dimen/dp_32"
|
||||
android:paddingEnd="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:text="结束用车"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/charter_p_shape_end_order"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_13"
|
||||
android:paddingStart="@dimen/dp_32"
|
||||
android:paddingEnd="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -60,7 +60,7 @@
|
||||
app:layout_constraintEnd_toEndOf="@+id/mapBizView"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
<!-- 速度 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_car_speed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -90,7 +90,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 距离、剩余时间、到达时间 -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
app:layout_constraintTop_toBottomOf="@+id/ll_car_speed"
|
||||
app:layout_constraintStart_toStartOf="@+id/ll_car_speed"
|
||||
@@ -196,50 +196,13 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cb_bp_video_player"
|
||||
android:src="@drawable/bus_p_function_bottom_information_bg_selector"
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomBar
|
||||
android:id="@+id/bb_boorombar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cb_bp_setting_soft"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cb_bp_setting_soft"
|
||||
android:src="@drawable/bus_p_function_bottom_soft_bg_selector"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_video_player"
|
||||
app:layout_constraintEnd_toStartOf="@+id/cb_bp_setting_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cb_bp_setting_device"
|
||||
android:src="@drawable/bus_p_function_bottom_device_bg_selector"
|
||||
app:layout_constraintEnd_toEndOf="@+id/cb_bp_setting_order"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_setting_soft"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
<ImageView
|
||||
android:id="@+id/cb_bp_setting_order"
|
||||
android:src="@drawable/bus_p_function_bottom_order_bg_selector"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_setting_device"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_end_order"
|
||||
android:src="@drawable/m1_order_end"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="-14dp"
|
||||
android:layout_width="@dimen/dp_181"
|
||||
android:layout_height="@dimen/dp_179"/>
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
|
||||
<!--消息盒子选择入口-->
|
||||
@@ -251,6 +214,14 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/aciv_enter_video"
|
||||
android:src="@drawable/charter_p_video"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewBusPM1MsgBoxButton"
|
||||
android:layout_width="@dimen/dp_147"
|
||||
android:layout_height="@dimen/dp_149"/>
|
||||
|
||||
<!--消息盒子打开视图-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.MMsgBoxListView
|
||||
android:id="@+id/viewBusPM1MsgBoxList"
|
||||
|
||||
@@ -10,47 +10,15 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/bus_p_function_setting_soft_b_shape"
|
||||
android:background="@drawable/charter_end_order_openclosedoor"
|
||||
android:clickable="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="1031:500"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_179"
|
||||
android:layout_marginBottom="@dimen/dp_181"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintWidth_percent="0.53698">
|
||||
<!-- 结束包车 后展示的界面 根据车辆状态来显示 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_early_end"
|
||||
android:layout_width="@dimen/dp_252"
|
||||
android:layout_height="@dimen/dp_172"
|
||||
android:layout_marginStart="@dimen/dp_56"
|
||||
android:layout_marginTop="@dimen/dp_63"
|
||||
android:src="@drawable/m1_order_end_car"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_end_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="本次包车旅程已结束。"
|
||||
android:textColor="@color/bus_p_m1_23293b"
|
||||
android:textSize="@dimen/dp_44"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_next_cloud"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_early_end"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_early_end"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_next_cloud"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇车联祝您旅途愉快,欢迎下次乘坐!"
|
||||
android:textColor="@color/bus_p_m1_485173"
|
||||
android:textSize="@dimen/dp_31"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_early_end"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_early_end"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_end_title" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_end_order_opendoor"
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/cl_container_order_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:background="@drawable/charter_p_shape_order_info"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:clickable="true"
|
||||
android:layout_marginBottom="@dimen/dp_140"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_width="@dimen/dp_327"
|
||||
android:layout_height="@dimen/dp_270">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_phone"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_33"
|
||||
android:text="18811539480"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:textColor="@color/bus_p_m1_203555"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_times"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_31"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_phone"
|
||||
android:text="09:00-18:00"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textColor="@color/bus_p_m1_0050E1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_order_times_title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_times"
|
||||
android:text="用车时间"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:textColor="@color/bus_p_m1_112b57"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_end_order"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_order_times_title"
|
||||
android:layout_marginTop="@dimen/dp_25"
|
||||
android:layout_marginBottom="@dimen/dp_27"
|
||||
android:background="@drawable/charter_p_shape_end_order"
|
||||
android:gravity="center"
|
||||
android:text="结束用车"
|
||||
android:textSize="@dimen/dp_18"
|
||||
android:paddingEnd="@dimen/dp_42"
|
||||
android:paddingStart="@dimen/dp_42"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_13"
|
||||
android:textColor="@android:color/white"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:background="@drawable/charter_p_shape_order_info"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
android:layout_marginBottom="@dimen/dp_140"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_width="@dimen/dp_400"
|
||||
android:layout_height="@dimen/dp_270">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:text="剩余时间 02:37"
|
||||
android:textSize="@dimen/dp_20"
|
||||
android:textColor="@color/bus_p_m1_5F7096"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_33"
|
||||
android:layout_marginEnd="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/actv_end_order_content"
|
||||
android:text="要提前说再见了吗?蘑菇小助手很舍不得您呢!"
|
||||
android:textSize="@dimen/dp_26"
|
||||
android:textColor="@color/bus_p_m1_112b57"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_92"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:text="结束用车"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
|
||||
android:background="@drawable/charter_p_shape_end_order_left"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_13"
|
||||
android:paddingStart="@dimen/dp_32"
|
||||
android:paddingEnd="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:text="结束用车"
|
||||
android:textSize="@dimen/dp_24"
|
||||
android:textColor="@android:color/white"
|
||||
android:background="@drawable/charter_p_shape_end_order"
|
||||
app:layout_constraintTop_toBottomOf="@+id/actv_end_order_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginEnd="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_17"
|
||||
android:paddingTop="@dimen/dp_14"
|
||||
android:paddingBottom="@dimen/dp_13"
|
||||
android:paddingStart="@dimen/dp_32"
|
||||
android:paddingEnd="@dimen/dp_32"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
<com.mogo.och.bus.passenger.ui.view.bottom.BottomBar
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_107"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -5,4 +5,16 @@
|
||||
<attr name="main_wind_drawable" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="BottomSelectView">
|
||||
<!-- 默认图片 -->
|
||||
<attr name="normalDrawable" format="reference" />
|
||||
<!-- 点击图片 -->
|
||||
<attr name="selectedDrawable" format="reference" />
|
||||
<!-- 显示背景view -->
|
||||
<attr name="backageViewId" format="reference" />
|
||||
<attr name="bottomTitle" format="string"/>
|
||||
|
||||
<attr name="bottomClick" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
@@ -18,12 +18,18 @@
|
||||
<color name="bus_p_m1_4a5375">#4A5375</color>
|
||||
<color name="bus_p_m1_0f1e57">#0F1E57</color>
|
||||
<color name="bus_p_m1_225eff">#225EFF</color>
|
||||
<color name="bus_p_m1_0050E1">#0050E1</color>
|
||||
<color name="bus_p_m1_1466FB">#1466FB</color>
|
||||
<color name="bus_p_m1_43CEFE">#43CEFE</color>
|
||||
<color name="bus_p_m1_3b4056">#3B4056</color>
|
||||
<color name="bus_p_m1_23293b">#23293B</color>
|
||||
<color name="bus_p_m1_485173">#485173</color>
|
||||
<color name="bus_p_m1_292c39">#292C39</color>
|
||||
<color name="bus_p_m1_2C2D31">#2C2D31</color>
|
||||
<color name="bus_p_m1_222222">#222222</color>
|
||||
<color name="bus_p_m1_090f28">#090F28</color>
|
||||
<color name="bus_p_m1_5F7096">#5F7096</color>
|
||||
<color name="bus_p_m1_9aabd2">#9AABD2</color>
|
||||
<color name="bus_p_m1_662C2D31">#662C2D31</color>
|
||||
<color name="bus_p_m1_332C2D31">#332C2D31</color>
|
||||
|
||||
@@ -34,4 +40,5 @@
|
||||
<color name="bus_p_m1_91EFF6FF">#91EFF6FF</color>
|
||||
<color name="bus_p_m1_CCFFFFFF">#CCFFFFFF</color>
|
||||
<color name="bus_p_m1_80ffffff">#80FFFFFF</color>
|
||||
<color name="bus_p_m1_f0e0efff">#F0E0EFFF </color>
|
||||
</resources>
|
||||
@@ -34,6 +34,8 @@
|
||||
<string name="m1_arrive_left_time">剩余(分)</string>
|
||||
<string name="m1_reach_time">到达</string>
|
||||
|
||||
<string name="m1_stop_site">靠边停车</string>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toBottomOf="@id/view_horizontal_line"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constrintLeft_toLeftOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/view_vertical_line"
|
||||
/>
|
||||
|
||||
|
||||
@@ -71,6 +71,19 @@ if (!isAndroidTestBuild()) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!isReleaseBuild) {
|
||||
apply plugin: 'bytex.matrix'
|
||||
|
||||
matrix {
|
||||
trace {
|
||||
enable = true //if you don't want to use trace canary, set false
|
||||
baseMethodMapFile = "${project.buildDir}/matrix_output/customMethodMapping.txt"
|
||||
blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt"
|
||||
}
|
||||
logLevel = "D"
|
||||
}
|
||||
}
|
||||
|
||||
//if (!isAndroidTestBuild()) {
|
||||
// /**
|
||||
// * 方便使用systrace工具,在工程侧打点,便于分析工程侧性能问题
|
||||
@@ -153,6 +166,7 @@ android {
|
||||
exclude 'META-INF/proguard/coroutines.pro'
|
||||
exclude 'META-INF/*'
|
||||
exclude "/lib/armeabi-v7a/*.so"
|
||||
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
@@ -198,8 +212,8 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
|
||||
16
app/matrixTrace/blackMethodList.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
-keeppackage com/mogo/thread/ext/
|
||||
-keeppackage com/mogo/launcher
|
||||
-keeppackage com/rousetime/android_startup/
|
||||
-keeppackage com/mogo/systrace/
|
||||
-keeppackage com/bytedance/boost_multidex/
|
||||
-keeppackage io/netty/
|
||||
-keeppackage com/elegant/log/
|
||||
-keeppackage org/slf4j/
|
||||
-keeppackage kotlin/
|
||||
-keepclass com.mogo.eagle.core.function.main.MainMoGoApplication
|
||||
-keepclass com.mogo.commons.AbsMogoApplication
|
||||
-keepclass com.bytedance.apm.agent.v2.instrumentation.AppAgent
|
||||
-keepclass androidx.core.app.CoreComponentFactory
|
||||
-keepclass com.mogo.eagle.core.utilcode.util.ProcessUtils
|
||||
-keepclass com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils
|
||||
@@ -12,8 +12,9 @@
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_shell_name"
|
||||
android:largeHeap="true"
|
||||
android:resizeableActivity="false"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:resizeableActivity="false"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.App"
|
||||
android:usesCleartextTraffic="true"
|
||||
|
||||
@@ -36,8 +36,7 @@ buildscript {
|
||||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
|
||||
classpath 'com.mogo.sticky:service:1.0.8'
|
||||
classpath 'io.github.knight-zxw:lancet-plugin:0.0.4.8_mogo'
|
||||
|
||||
// classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
|
||||
classpath 'com.mogo.cloud:matrix:1.0.0'
|
||||
}
|
||||
// 遇无法更新依赖情况(针对Snapshot无法刷新)然后sync project即可,刷新完成注释该代码
|
||||
// configurations.all {
|
||||
|
||||
@@ -90,6 +90,11 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidautoSize
|
||||
implementation rootProject.ext.dependencies.koomnative
|
||||
implementation rootProject.ext.dependencies.koomxhook
|
||||
implementation group: "com.tencent.matrix", name: "matrix-android-lib", version: MATRIX_VERSION, changing: true
|
||||
implementation group: "com.tencent.matrix", name: "matrix-android-commons", version: MATRIX_VERSION, changing: true
|
||||
implementation group: "com.tencent.matrix", name: "matrix-trace-canary", version: MATRIX_VERSION, changing: true
|
||||
implementation group: "com.tencent.matrix", name: "matrix-io-canary", version: MATRIX_VERSION, changing: true
|
||||
implementation group: "com.tencent.matrix", name: "matrix-hooks", version: MATRIX_VERSION, changing: true
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
|
||||
@@ -8,8 +8,9 @@ import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.EnvConfig
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.ModifyBindingcarInfo
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.ModifyBindingcarInfo
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
@@ -19,6 +20,16 @@ import com.mogo.eagle.core.function.api.devatools.apm.*
|
||||
import com.mogo.eagle.core.function.api.devatools.strict.*
|
||||
import com.mogo.eagle.core.function.call.map.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.w
|
||||
import com.tencent.matrix.Matrix
|
||||
import com.tencent.matrix.iocanary.IOCanaryPlugin
|
||||
import com.tencent.matrix.iocanary.config.IOConfig
|
||||
import com.tencent.matrix.plugin.Plugin
|
||||
import com.tencent.matrix.plugin.PluginListener
|
||||
import com.tencent.matrix.report.Issue
|
||||
import com.tencent.matrix.trace.TracePlugin
|
||||
import com.tencent.matrix.trace.config.SharePluginInfo
|
||||
import com.tencent.matrix.trace.config.TraceConfig
|
||||
import com.zhjt.mogo_core_function_devatools.apm.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
@@ -28,11 +39,11 @@ import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigCenter.Compani
|
||||
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigImpl
|
||||
import com.zhjt.mogo_core_function_devatools.koom.KoomInitTask
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchManager
|
||||
import com.zhjt.mogo_core_function_devatools.matrix.DynamicConfigImpl
|
||||
import com.zhjt.mogo_core_function_devatools.mofang.MoFangManager.Companion.moFangManager
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.MonitorManager
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb
|
||||
import com.zhjt.mogo_core_function_devatools.monitor.db.MonitorDb.Companion.getDb
|
||||
import com.zhjt.mogo_core_function_devatools.report.IPCReportManager
|
||||
import com.zhjt.mogo_core_function_devatools.report.IPCReportManager.Companion.iPCReportManager
|
||||
import com.zhjt.mogo_core_function_devatools.scene.SceneManager.Companion.sceneManager
|
||||
import com.zhjt.mogo_core_function_devatools.status.StatusManager
|
||||
@@ -40,6 +51,8 @@ import com.zhjt.mogo_core_function_devatools.strict.*
|
||||
import com.zhjt.mogo_core_function_devatools.trace.TraceManager.Companion.traceManager
|
||||
import com.zhjt.mogo_core_function_devatools.tts.TtsManager.Companion.ttsManager
|
||||
import com.zhjt.mogo_core_function_devatools.upgrade.UpgradeManager.Companion.upgradeManager
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import com.zhjt.service.chain.TracingConstants.Endpoint.Companion.PAD
|
||||
|
||||
@Route(path = MogoServicePaths.PATH_DEVA_TOOLS)
|
||||
class DevaToolsProvider : IDevaToolsProvider {
|
||||
@@ -62,12 +75,13 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
}
|
||||
|
||||
override fun initBiz() {
|
||||
if (DebugConfig.isDebug()) {
|
||||
KoomInitTask.init(AbsMogoApplication.getApp())
|
||||
}
|
||||
ttsManager.initTts(mContext!!) //todo
|
||||
//链路相关
|
||||
traceManager.init(mContext!!)
|
||||
if (DebugConfig.isDebug()) {
|
||||
KoomInitTask.init(AbsMogoApplication.getApp())
|
||||
initMatrix()
|
||||
}
|
||||
ttsManager.initTts(mContext!!) //todo
|
||||
bizConfigCenter.init(mContext!!)
|
||||
FuncConfigImpl.init()
|
||||
MogoLogCatchManager.init(mContext!!)
|
||||
@@ -103,6 +117,76 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
}
|
||||
}
|
||||
|
||||
private fun initMatrix() {
|
||||
val builder: Matrix.Builder = Matrix.Builder(AbsMogoApplication.getApp())
|
||||
builder.pluginListener(object : PluginListener {
|
||||
override fun onInit(plugin: Plugin?) {
|
||||
}
|
||||
|
||||
override fun onStart(plugin: Plugin?) {
|
||||
}
|
||||
|
||||
override fun onStop(plugin: Plugin?) {
|
||||
}
|
||||
|
||||
override fun onDestroy(plugin: Plugin?) {
|
||||
}
|
||||
|
||||
override fun onReportIssue(issue: Issue?) {
|
||||
var isEvil = false
|
||||
issue?.apply {
|
||||
if (plugin is TracePlugin) {
|
||||
if (tag == SharePluginInfo.TAG_PLUGIN_EVIL_METHOD) {
|
||||
isEvil = true
|
||||
printEvilMsg(issue.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isEvil) {
|
||||
w("TraceCanary", issue?.toString())
|
||||
}
|
||||
}
|
||||
})
|
||||
val config: TraceConfig = TraceConfig.Builder()
|
||||
.enableFPS(true) // 帧率
|
||||
.enableEvilMethodTrace(true) // 慢方法
|
||||
.enableAnrTrace(true) // anr
|
||||
.enableStartup(true) // app启动
|
||||
.isDebug(true) // debug包
|
||||
.isDevEnv(true) // dev环境
|
||||
.build()
|
||||
|
||||
// Trace Canary插件
|
||||
val tracePlugin = TracePlugin(config)
|
||||
builder.plugin(tracePlugin)
|
||||
|
||||
val ioCanaryPlugin = IOCanaryPlugin(
|
||||
IOConfig.Builder()
|
||||
.dynamicConfig(DynamicConfigImpl())
|
||||
.build())
|
||||
|
||||
builder.plugin(ioCanaryPlugin)
|
||||
|
||||
Matrix.init(builder.build())
|
||||
// 日志刷太快,关掉
|
||||
Matrix.setLogIml(null)
|
||||
// 开启Trace Canary
|
||||
tracePlugin.start()
|
||||
ioCanaryPlugin.start()
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_LINK_LOG_ANR,
|
||||
linkCode = ChainConstant.CHAIN_LINK_ANR,
|
||||
endpoint = PAD,
|
||||
nodeAliasCode = ChainConstant.CHAIN_ALIAS_CODE_RECORD_ANR,
|
||||
paramIndexes = [0],
|
||||
clientPkFileName = "sn"
|
||||
)
|
||||
private fun printEvilMsg(evilMethod: String) {
|
||||
w("TraceCanary", evilMethod)
|
||||
}
|
||||
|
||||
override fun startLogCatch() {
|
||||
MogoLogCatchManager.startCatchLog()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zhjt.mogo_core_function_devatools.matrix
|
||||
|
||||
import com.tencent.mrs.plugin.IDynamicConfig
|
||||
|
||||
class DynamicConfigImpl: IDynamicConfig {
|
||||
|
||||
fun isFPSEnable(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
fun isTraceEnable(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
fun isMatrixEnable(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
fun isDumpHprof(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun get(key: String?, defStr: String?): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
override fun get(key: String?, defInt: Int): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
override fun get(key: String?, defLong: Long): Long {
|
||||
return 0L
|
||||
}
|
||||
|
||||
override fun get(key: String?, defBool: Boolean): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun get(key: String?, defFloat: Float): Float {
|
||||
return 0f
|
||||
}
|
||||
|
||||
}
|
||||
@@ -67,6 +67,8 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_ADAS_PLANNING_ACTIONS)
|
||||
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_NATIVE_LEAK] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_NATIVE_LEAK)
|
||||
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_ANR] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_ANR)
|
||||
fwBuildMap[ChainConstant.CHAIN_LINK_LOG_CLOUD_V2N] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_CLOUD_WEB_SOCKET_V2N)
|
||||
|
||||
@@ -91,6 +93,8 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
ChainLogParam(true, "ADAS PLANNING 决策行为")
|
||||
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_NATIVE_LEAK] =
|
||||
ChainLogParam(true, "Native Leak Record")
|
||||
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_ANR] =
|
||||
ChainLogParam(true, "ANR Record")
|
||||
traceInfoCache[ChainConstant.CHAIN_LINK_LOG_CLOUD_V2N] =
|
||||
ChainLogParam(true, "Cloud WebSocket V2N")
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<dimen name="dp_18">18dp</dimen>
|
||||
<dimen name="dp_30">30dp</dimen>
|
||||
<dimen name="dp_34">34dp</dimen>
|
||||
<dimen name="dp_34_5">34.5dp</dimen>
|
||||
<dimen name="dp_36">36dp</dimen>
|
||||
<dimen name="dp_38">38dp</dimen>
|
||||
<dimen name="dp_42">42dp</dimen>
|
||||
|
||||
@@ -12,6 +12,8 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_INIT = 2
|
||||
// Native内存泄漏
|
||||
const val CHAIN_LINK_LEAK = 10
|
||||
// ANR
|
||||
const val CHAIN_LINK_ANR = 11
|
||||
|
||||
const val CHAIN_LINK_LOG_CONNECT_STATUS = 0
|
||||
const val CHAIN_LINK_LOG_WEB_SOCKET_GNSSINFO = 1
|
||||
@@ -24,6 +26,7 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_LOG_WEB_SOCKET_PLANNING_ACTIONS = 8
|
||||
const val CHAIN_LINK_LOG_NATIVE_LEAK = 100
|
||||
const val CHAIN_LINK_LOG_CLOUD_V2N = 200
|
||||
const val CHAIN_LINK_LOG_ANR = 300
|
||||
|
||||
const val CHAIN_LINK_LOG_ADAS_INIT = "-eagleInitStatus"
|
||||
const val CHAIN_LINK_LOG_ADAS_GNSS = "-adasWsGnssInfo"
|
||||
@@ -36,6 +39,7 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_LOG_ADAS_PLANNING_ACTIONS = "-adasWsPlanningActions"
|
||||
const val CHAIN_LINK_LOG_RECORD_NATIVE_LEAK = "-eagleRecordNativeLeak"
|
||||
const val CHAIN_LINK_LOG_CLOUD_WEB_SOCKET_V2N = "-eagleCloudWSV2N"
|
||||
const val CHAIN_LINK_LOG_RECORD_ANR = "-eagleRecordANR"
|
||||
|
||||
const val CHAIN_ALIAS_CODE_MULTI_CONNECT = "CHAIN_ALIAS_CODE_MULTI_CONNECT"
|
||||
const val CHAIN_ALIAS_CODE_ADAS_MESSAGE_CAR_CONFIG = "CHAIN_ALIAS_CODE_CAR_CONFIG"
|
||||
@@ -55,6 +59,7 @@ class ChainConstant {
|
||||
const val CHAIN_ALIAS_CODE_ADAS_MESSAGE_AUTOPILOT_WARN = "PAD_ADAS_MESSAGE_AUTOPILOT_WARN"
|
||||
|
||||
const val CHAIN_ALIAS_CODE_RECORD_NATIVE_LEAK = "CHAIN_ALIAS_CODE_RECORD_NATIVE_LEAK"
|
||||
const val CHAIN_ALIAS_CODE_RECORD_ANR = "CHAIN_ALIAS_CODE_RECORD_ANR"
|
||||
|
||||
const val CHAIN_ALIAS_CODE_INIT_ENV_RESTART = "CHAIN_ALIAS_CODE_INIT_ENV_RESTART"
|
||||
const val CHAIN_ALIAS_CODE_APP_INFO_CONFIG_UPDATE = "CHAIN_ALIAS_CODE_APP_INFO_CONFIG_UPDATE"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<dimen name="dp_7_5">7.5dp</dimen>
|
||||
<dimen name="dp_8">8dp</dimen>
|
||||
<dimen name="dp_9">9dp</dimen>
|
||||
<dimen name="dp_9_5">9.5dp</dimen>
|
||||
<dimen name="dp_10">10dp</dimen>
|
||||
<dimen name="dp_11">11dp</dimen>
|
||||
<dimen name="dp_12">12dp</dimen>
|
||||
|
||||
@@ -146,6 +146,8 @@ ADAS_DATA_LIB_CHILD_VERSION=.0
|
||||
|
||||
# 线程优化版本
|
||||
THREAD_OPT_VERSION=4.0.1
|
||||
# matrix版本
|
||||
MATRIX_VERSION=2.0.8
|
||||
|
||||
# 测试模式司机端版本号
|
||||
NOOP_DRIVER_VERSION=3.1.0
|
||||
|
||||