[charter]
[3.2.0] [底部导航栏功能]
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1DeviceFragment
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
package com.mogo.och.bus.passenger.presenter
|
||||
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.OrderInfoDialogFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.OrderInfoFragment
|
||||
|
||||
class OrderInfoPresenter(view: OrderInfoDialogFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<OrderInfoDialogFragment?>(view) {
|
||||
class OrderInfoPresenter(view: OrderInfoFragment?) :
|
||||
BusBasePassengerFunctionDevicePresenter<OrderInfoFragment?>(view) {
|
||||
companion object{
|
||||
private const val TAG = "BusPassengerFunctionPresenter"
|
||||
}
|
||||
|
||||
@@ -12,19 +12,15 @@ import com.mogo.commons.mvp.MvpFragment
|
||||
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.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.common.module.voice.VoiceManager
|
||||
import com.mogo.och.bus.passenger.presenter.BusPassengerPresenter
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1CarUserNoOrderFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.M1ContainFragment
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.OrderInfoDialogFragment
|
||||
import com.mogo.och.common.module.biz.constant.LoginStatusManager
|
||||
import kotlinx.android.synthetic.main.m1_main_fragment.*
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
@@ -36,7 +32,6 @@ class MainFragment :
|
||||
MvpFragment<MainFragment?, BusPassengerPresenter?>() {
|
||||
|
||||
private var bpFunctionGroupDialogFragment: WeakReference<M1ContainFragment>? = null
|
||||
private var orderInfoDialogFragment: WeakReference<OrderInfoDialogFragment>? = null
|
||||
private var m1CarUserNoOrderFragment: WeakReference<M1CarUserNoOrderFragment>? = null
|
||||
|
||||
val endStation =
|
||||
@@ -66,11 +61,18 @@ class MainFragment :
|
||||
|
||||
})
|
||||
|
||||
bb_boorombar.setSettingClickListener(object :OnClickListener{
|
||||
override fun onClick(v: View?) {
|
||||
openOrderInfoPage()
|
||||
}
|
||||
})
|
||||
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) {
|
||||
@@ -112,45 +114,6 @@ class MainFragment :
|
||||
}
|
||||
}
|
||||
|
||||
private fun openOrderInfoPage() {
|
||||
val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(
|
||||
OrderInfoDialogFragment.TAG)
|
||||
if (fragmentByTag is DialogFragment) {
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) {
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "正在展示")
|
||||
return
|
||||
}
|
||||
if (fragmentByTag.dialog != null && fragmentByTag.isAdded) {
|
||||
if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "权限验证")
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (orderInfoDialogFragment?.get() == null) {
|
||||
orderInfoDialogFragment = WeakReference(OrderInfoDialogFragment.newInstance())
|
||||
}
|
||||
val bpFunctionGroup = orderInfoDialogFragment?.get()
|
||||
if (bpFunctionGroup != null) {
|
||||
if (bpFunctionGroup.dialog != null && bpFunctionGroup.dialog!!.isShowing) {
|
||||
return
|
||||
}
|
||||
if (bpFunctionGroup.isAdded) { //解决方法就是添加这行代码,如果已经添加了,就移除掉然后再show,就不会出现Fragment already added的错误了。
|
||||
parentFragmentManager.beginTransaction().remove(bpFunctionGroup)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
if (ClickUtils.isFastClick()) {
|
||||
bpFunctionGroup.show(parentFragmentManager, TAG)
|
||||
CallerLogger.d(SceneConstant.M_BUS_P + TAG, "展示")
|
||||
} else {
|
||||
CallerLogger.d(
|
||||
SceneConstant.M_BUS_P + TAG, "dialog 1s内执行一次"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun setSpeed(speed: String) {
|
||||
tv_speed.text = speed
|
||||
|
||||
@@ -4,7 +4,6 @@ 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
|
||||
@@ -16,11 +15,11 @@ 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.*
|
||||
import com.mogo.och.bus.passenger.ui.dialogfragment.fragment.M1DeviceFragment
|
||||
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 kotlinx.android.synthetic.main.m1_contain_fragment.*
|
||||
|
||||
/**
|
||||
@@ -33,9 +32,9 @@ class M1ContainFragment :
|
||||
var tab: String = VIDEOTAB
|
||||
var fragmentTag: String = M1VideoFragment.TAG
|
||||
var fragment: Fragment? = null
|
||||
var isEarlyClose:Boolean = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
CallerLogger.d(M_BUS_P+ TAG, "onCreate")
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
tab = it.getString(SELECTTAB, VIDEOTAB)
|
||||
@@ -43,44 +42,31 @@ class M1ContainFragment :
|
||||
savedInstanceState?.let {
|
||||
tab = it.getString(SELECTTAB, tab)
|
||||
}
|
||||
isEarlyClose = tab== SETTINGENDORDERTAB
|
||||
setStyle(STYLE_NO_TITLE, R.style.DialogFullScreen) //dialog全屏
|
||||
}
|
||||
|
||||
private fun initFragment() {
|
||||
private fun setCheckView() {
|
||||
CallerLogger.d(M_BUS_P+ TAG, "setCheckView")
|
||||
when (tab) {
|
||||
VIDEOTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1VideoFragment.TAG)
|
||||
?: M1VideoFragment.newInstance()
|
||||
}
|
||||
SETTINGDEVICETAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1DeviceFragment.TAG)
|
||||
?: M1DeviceFragment.newInstance()
|
||||
fragment = childFragmentManager.findFragmentByTag(M1VideoFragment.TAG)
|
||||
?: M1VideoFragment.newInstance()
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.VIDEO)
|
||||
}
|
||||
SETTINGSOFTTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1SoftFragment.TAG)
|
||||
?: M1SoftFragment.newInstance()
|
||||
fragment = childFragmentManager.findFragmentByTag(M1SoftFragment.TAG)
|
||||
?: M1SoftFragment.newInstance()
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.SETTING)
|
||||
}
|
||||
SETTINGORDERTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1OrderLineFragment.TAG)
|
||||
?: M1OrderLineFragment.newInstance(object : ChangeCheck {
|
||||
override fun changeChange() {
|
||||
cb_bp_setting_device.isChecked = true
|
||||
}
|
||||
})
|
||||
ORDERINFO -> {
|
||||
fragment = childFragmentManager.findFragmentByTag(OrderInfoFragment.TAG)
|
||||
?: OrderInfoFragment.newInstance()
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.ORDERINFO)
|
||||
}
|
||||
SETTINGENDORDERTAB -> {
|
||||
fragment =
|
||||
childFragmentManager.findFragmentByTag(M1EarlyEndOrderFragment.TAG)
|
||||
?: M1EarlyEndOrderFragment.newInstance(object : ContainDismiss {
|
||||
override fun closeDialog() {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
})
|
||||
SELECTLINE ->{
|
||||
fragment = childFragmentManager.findFragmentByTag(M1OrderLineFragment.TAG)
|
||||
?: M1OrderLineFragment.newInstance()
|
||||
bb_bottom_bar.setCheckIndex(BottomBar.SelectView.LINE)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
@@ -89,9 +75,7 @@ class M1ContainFragment :
|
||||
.replace(R.id.fl_function_group, it, fragmentTag)
|
||||
.commitNow()
|
||||
}
|
||||
cl_container.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.m1_contain_fragment
|
||||
@@ -101,11 +85,44 @@ class M1ContainFragment :
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
@@ -116,87 +133,9 @@ class M1ContainFragment :
|
||||
}
|
||||
}
|
||||
|
||||
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 = M1OrderLineFragment.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)
|
||||
CallerLogger.d(M_BUS_P+ TAG, "onSaveInstanceState")
|
||||
context?.let {
|
||||
SharedPrefs.getInstance(it).putString(SELECTTAB, tab)
|
||||
}
|
||||
@@ -240,25 +179,13 @@ class M1ContainFragment :
|
||||
|
||||
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
|
||||
VIDEOTAB -> {
|
||||
|
||||
}
|
||||
SETTINGSOFTTAB -> {}
|
||||
ORDERINFO -> {}
|
||||
SELECTLINE -> {}
|
||||
else -> {}
|
||||
}
|
||||
super.onViewStateRestored(savedInstanceState)
|
||||
@@ -267,11 +194,27 @@ class M1ContainFragment :
|
||||
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 ORDERINFO = "OrderInfo"
|
||||
|
||||
/**
|
||||
* 选择线路
|
||||
*/
|
||||
const val SELECTLINE = "SelectLine"
|
||||
|
||||
|
||||
|
||||
const val SELECTTAB = "SELECTTAB"
|
||||
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
package com.mogo.och.bus.passenger.ui.dialogfragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.DisplayMetrics
|
||||
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.och.bus.passenger.R
|
||||
import com.mogo.och.bus.passenger.presenter.OrderInfoPresenter
|
||||
import com.mogo.och.bus.passenger.ui.*
|
||||
import kotlinx.android.synthetic.main.m1_contain_fragment.*
|
||||
import kotlinx.android.synthetic.main.orderinfo_fragment.*
|
||||
import me.jessyan.autosize.AutoSizeCompat
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
import me.jessyan.autosize.utils.ScreenUtils
|
||||
|
||||
/**
|
||||
* @author: yangyakun
|
||||
* @date: 2023/1/28
|
||||
*/
|
||||
class OrderInfoDialogFragment :
|
||||
MvpDialogFragment<OrderInfoDialogFragment?, OrderInfoPresenter?>() {
|
||||
|
||||
var fragment: Fragment? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
arguments?.let {
|
||||
|
||||
}
|
||||
savedInstanceState?.let {
|
||||
|
||||
}
|
||||
setStyle(STYLE_NO_TITLE, R.style.DialogFullScreen) //dialog全屏
|
||||
}
|
||||
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.orderinfo_fragment
|
||||
|
||||
override fun getTagName(): String = TAG
|
||||
|
||||
override fun initViews() {
|
||||
dialog?.setCancelable(true)
|
||||
cl_container_order_info.setOnClickListener {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
context?.let {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun createPresenter(): OrderInfoPresenter =
|
||||
OrderInfoPresenter(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")
|
||||
|
||||
super.onViewStateRestored(savedInstanceState)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionFragment"
|
||||
|
||||
@JvmStatic
|
||||
fun newInstance(): OrderInfoDialogFragment {
|
||||
val args = Bundle()
|
||||
val fragment = OrderInfoDialogFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -246,11 +246,10 @@ class M1OrderLineFragment :
|
||||
const val TAG = "BusPassengerFunctionOrderFragment"
|
||||
|
||||
@JvmStatic
|
||||
fun newInstance(changeCheck: M1ContainFragment.ChangeCheck): M1OrderLineFragment {
|
||||
fun newInstance(): M1OrderLineFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1OrderLineFragment()
|
||||
fragment.arguments = args
|
||||
fragment.changeCheck = changeCheck
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@ 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.BusPassengerFunctionDevicePresenter
|
||||
import com.mogo.och.bus.passenger.presenter.OrderInfoPresenter
|
||||
|
||||
/**
|
||||
* @author: yangyakun
|
||||
* @date: 2023/1/28
|
||||
*/
|
||||
class M1DeviceFragment :
|
||||
MvpFragment<M1DeviceFragment?, BusPassengerFunctionDevicePresenter?>() {
|
||||
class OrderInfoFragment :
|
||||
MvpFragment<OrderInfoFragment?, OrderInfoPresenter?>() {
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.m1_devices_fragment
|
||||
|
||||
@@ -24,15 +24,15 @@ class M1DeviceFragment :
|
||||
|
||||
}
|
||||
|
||||
override fun createPresenter(): BusPassengerFunctionDevicePresenter =
|
||||
BusPassengerFunctionDevicePresenter(this)
|
||||
override fun createPresenter(): OrderInfoPresenter =
|
||||
OrderInfoPresenter(this)
|
||||
|
||||
companion object {
|
||||
const val TAG = "BusPassengerFunctionDeviceFragment"
|
||||
const val TAG = "OrderInfoFragment"
|
||||
@JvmStatic
|
||||
fun newInstance(): M1DeviceFragment {
|
||||
fun newInstance(): OrderInfoFragment {
|
||||
val args = Bundle()
|
||||
val fragment = M1DeviceFragment()
|
||||
val fragment = OrderInfoFragment()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
@@ -18,12 +18,50 @@ class BottomBar @JvmOverloads constructor(
|
||||
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 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
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,13 +35,15 @@ open class BottomClickView @JvmOverloads constructor(
|
||||
private var backageView: View? = null
|
||||
|
||||
private var showBackageView = true
|
||||
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)?:""
|
||||
bottomTitle = typedArray.getString(R.styleable.BottomSelectView_bottomTitle) ?: ""
|
||||
showBackageView = typedArray.getBoolean(R.styleable.BottomSelectView_bottomClick, true)
|
||||
selectedDrawable =
|
||||
typedArray.getResourceId(R.styleable.BottomSelectView_selectedDrawable, -1)
|
||||
normalDrawable =
|
||||
@@ -59,59 +61,60 @@ open class BottomClickView @JvmOverloads constructor(
|
||||
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))
|
||||
if(showBackageView) {
|
||||
if (showBackageView) {
|
||||
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))
|
||||
if(showBackageView) {
|
||||
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))
|
||||
if(showBackageView) {
|
||||
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 -> {}
|
||||
}
|
||||
else -> {}
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun setCheckItem(isCheck:Boolean){
|
||||
if(isCheck!=showBackageView){
|
||||
showBackageView = isCheck
|
||||
fun setCheckItem(isCheck: Boolean) {
|
||||
showBackageView = false
|
||||
if (isCheck != this.isCheck) {
|
||||
this.isCheck = isCheck
|
||||
notifiBackageView()
|
||||
}
|
||||
}
|
||||
|
||||
private fun notifiBackageView() {
|
||||
if(showBackageView){
|
||||
if (isCheck) {
|
||||
backageView?.visibility = View.VISIBLE
|
||||
}else{
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,5 +127,8 @@ open class BottomClickView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isCheck) {
|
||||
backageView?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -8,52 +8,19 @@
|
||||
|
||||
<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_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,142 @@
|
||||
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_marginBottom="@dimen/dp_140"
|
||||
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.bottom.impl.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.bottom.impl.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.bottom.impl.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.bottom.impl.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_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>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -214,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"
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
<!-- 显示背景view -->
|
||||
<attr name="backageViewId" format="reference" />
|
||||
<attr name="bottomTitle" format="string"/>
|
||||
|
||||
<attr name="bottomClick" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user