diff --git a/OCH/mogo-och-bus-passenger/build.gradle b/OCH/mogo-och-bus-passenger/build.gradle index 883435c245..41462ddc64 100644 --- a/OCH/mogo-och-bus-passenger/build.gradle +++ b/OCH/mogo-och-bus-passenger/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' +apply plugin: 'kotlin-kapt' android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -16,9 +17,10 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" - javaCompileOptions { - annotationProcessorOptions { - arguments = [AROUTER_MODULE_NAME: project.getName()] + kapt { + useBuildCache = false + arguments { + arg("AROUTER_MODULE_NAME", project.getName()) } } } @@ -65,20 +67,20 @@ android { } sourceSets { shuttle { - res.srcDirs = [ - 'src/basecommon/res', 'src/shuttle/res', - ] - java.srcDirs=[ - 'src/basecommon/java', 'src/shuttle/java', - ] + res.srcDirs = ['src/basecommon/res', 'src/shuttle/res',] + java.srcDirs=['src/basecommon/java', 'src/shuttle/java',] } base { - res.srcDirs = [ - 'src/basecommon/res', 'src/base/res', - ] - java.srcDirs=[ - 'src/basecommon/java', 'src/base/java', - ] + res.srcDirs = ['src/basecommon/res', 'src/base/res',] + java.srcDirs=['src/basecommon/java', 'src/base/java',] + } + m1 { + res.srcDirs = ['src/m1/res'] + java.srcDirs=['src/m1/java'] + } + m2 { + res.srcDirs = ['src/m2/res'] + java.srcDirs=['src/m2/java'] } } } @@ -90,7 +92,7 @@ dependencies { implementation rootProject.ext.dependencies.arouter implementation rootProject.ext.dependencies.androidxrecyclerview implementation rootProject.ext.dependencies.material - annotationProcessor rootProject.ext.dependencies.aroutercompiler + kapt rootProject.ext.dependencies.aroutercompiler implementation rootProject.ext.dependencies.rxandroid implementation rootProject.ext.dependencies.androidxconstraintlayout implementation rootProject.ext.dependencies.amapnavi3dmap diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt new file mode 100644 index 0000000000..49bb875204 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionDevicePresenter.kt @@ -0,0 +1,7 @@ +package com.mogo.och.bus.passenger.presenter + +import com.mogo.commons.mvp.Presenter +import com.mogo.och.bus.passenger.ui.BusPassengerFunctionDeviceFragment + +class BusPassengerFunctionDevicePresenter(view: BusPassengerFunctionDeviceFragment?) : + Presenter(view) \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionPresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionPresenter.kt new file mode 100644 index 0000000000..359a5fa247 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionPresenter.kt @@ -0,0 +1,7 @@ +package com.mogo.och.bus.passenger.presenter + +import com.mogo.commons.mvp.Presenter +import com.mogo.och.bus.passenger.ui.BusPassengerFunctionFragment + +class BusPassengerFunctionPresenter(view: BusPassengerFunctionFragment?) : + Presenter(view) \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt new file mode 100644 index 0000000000..14e8be097e --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionSoftPresenter.kt @@ -0,0 +1,7 @@ +package com.mogo.och.bus.passenger.presenter + +import com.mogo.commons.mvp.Presenter +import com.mogo.och.bus.passenger.ui.BusPassengerFunctionSoftFragment + +class BusPassengerFunctionSoftPresenter(view: BusPassengerFunctionSoftFragment?) : + Presenter(view) \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionVideoPresenter.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionVideoPresenter.kt new file mode 100644 index 0000000000..9b51284e02 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/presenter/BusPassengerFunctionVideoPresenter.kt @@ -0,0 +1,7 @@ +package com.mogo.och.bus.passenger.presenter + +import com.mogo.commons.mvp.Presenter +import com.mogo.och.bus.passenger.ui.BusPassengerFunctionVideoFragment + +class BusPassengerFunctionVideoPresenter(view: BusPassengerFunctionVideoFragment?) : + Presenter(view) \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionDeviceFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionDeviceFragment.kt new file mode 100644 index 0000000000..26193286c2 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionDeviceFragment.kt @@ -0,0 +1,35 @@ +package com.mogo.och.bus.passenger.ui + +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 + +/** + * @author: yangyakun + * @date: 2023/1/28 + */ +class BusPassengerFunctionDeviceFragment : + MvpFragment() { + override fun getLayoutId(): Int = R.layout.bus_p_function_setting_devices_fragment + + override fun getTagName(): String = TAG + + override fun initViews() { + + } + + override fun createPresenter(): BusPassengerFunctionDevicePresenter = + BusPassengerFunctionDevicePresenter(this) + + companion object { + const val TAG = "BusPassengerFunctionDeviceFragment" + @JvmStatic + fun newInstance(): BusPassengerFunctionDeviceFragment { + val args = Bundle() + val fragment = BusPassengerFunctionDeviceFragment() + fragment.arguments = args + return fragment + } + } +} \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionFragment.kt new file mode 100644 index 0000000000..39310f52e5 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionFragment.kt @@ -0,0 +1,206 @@ +package com.mogo.och.bus.passenger.ui + +import android.graphics.Color +import android.graphics.drawable.ColorDrawable +import android.os.Bundle +import android.util.Log +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.m1.bus_p_function_fragment.* + +/** + * @author: yangyakun + * @date: 2023/1/28 + */ +class BusPassengerFunctionFragment : + MvpDialogFragment() { + + var tab: String = VIDEOTAB + var fragmentTag: String = BusPassengerFunctionVideoFragment.TAG + var fragment: Fragment? = null + + override fun onCreate(savedInstanceState: Bundle?) { + 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 initFragment() { + when (tab) { + VIDEOTAB -> { + fragment = + childFragmentManager.findFragmentByTag(BusPassengerFunctionVideoFragment.TAG) + ?: BusPassengerFunctionVideoFragment.newInstance() + } + SETTINGDEVICETAB -> { + fragment = + childFragmentManager.findFragmentByTag(BusPassengerFunctionDeviceFragment.TAG) + ?: BusPassengerFunctionDeviceFragment.newInstance() + } + SETTINGSOFTTAB -> { + fragment = + childFragmentManager.findFragmentByTag(BusPassengerFunctionSoftFragment.TAG) + ?: BusPassengerFunctionSoftFragment.newInstance() + } + else -> {} + } + fragment?.let { + childFragmentManager.beginTransaction() + .replace(R.id.fl_function_group, it, fragmentTag) + .commitNow() + } + } + + override fun getLayoutId(): Int = R.layout.bus_p_function_fragment + + override fun getTagName(): String = TAG + + override fun initViews() { + dialog?.window?.let { + BarUtils.hideStatusBarAndSticky(it) + it.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)); + } + dialog?.setCancelable(false) + } + + private val videoListener = CompoundButton.OnCheckedChangeListener { _, isChecked -> + CallerLogger.d(M_BUS_P+TAG, "videoListener$isChecked") + if (isChecked) { + tab = VIDEOTAB + fragmentTag = BusPassengerFunctionVideoFragment.TAG + cb_bp_setting_soft.isChecked = false + cb_bp_setting_device.isChecked = false + initFragment() + }else{ + if(!cb_bp_video_player.isChecked&&!cb_bp_setting_soft.isChecked&&!cb_bp_setting_device.isChecked){ + dismiss() + } + } + } + + private val settingDevices = CompoundButton.OnCheckedChangeListener { _, isChecked -> + CallerLogger.d(M_BUS_P+TAG, "settingDevices$isChecked") + if (isChecked) { + tab = SETTINGDEVICETAB + fragmentTag = BusPassengerFunctionDeviceFragment.TAG + cb_bp_setting_soft.isChecked = false + cb_bp_video_player.isChecked = false + initFragment() + }else{ + if(!cb_bp_video_player.isChecked&&!cb_bp_setting_soft.isChecked&&!cb_bp_setting_device.isChecked){ + dismiss() + } + } + } + + private val settingSoft = CompoundButton.OnCheckedChangeListener { _, isChecked -> + CallerLogger.d(M_BUS_P+TAG, "settingSoft$isChecked") + if (isChecked) { + tab = SETTINGSOFTTAB + fragmentTag = BusPassengerFunctionSoftFragment.TAG + cb_bp_video_player.isChecked = false + cb_bp_setting_device.isChecked = false + initFragment() + }else{ + if(!cb_bp_video_player.isChecked&&!cb_bp_setting_soft.isChecked&&!cb_bp_setting_device.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 (cls != null) { + 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_video_player.isChecked = false + cb_bp_setting_soft.isChecked = false + cb_bp_setting_device.isChecked = false + cb_bp_video_player.setOnCheckedChangeListener(videoListener) + cb_bp_setting_soft.setOnCheckedChangeListener(settingSoft) + cb_bp_setting_device.setOnCheckedChangeListener(settingDevices) + when (tab) { + VIDEOTAB -> cb_bp_video_player.isChecked = true + SETTINGDEVICETAB -> cb_bp_setting_device.isChecked = true + SETTINGSOFTTAB -> cb_bp_setting_soft.isChecked = true + else -> {} + } + super.onViewStateRestored(savedInstanceState) + } + + companion object { + const val TAG = "BusPassengerFunctionFragment" + + const val VIDEOTAB = "VideoTab" + const val SETTINGDEVICETAB = "SettingDeviceTab" + const val SETTINGSOFTTAB = "SettingSoftTab" + + const val SELECTTAB = "SELECTTAB" + + @JvmStatic + fun newInstance(): BusPassengerFunctionFragment { + val args = Bundle() + val fragment = BusPassengerFunctionFragment() + fragment.arguments = args + return fragment + } + } +} \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt new file mode 100644 index 0000000000..5e967233e6 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionSoftFragment.kt @@ -0,0 +1,36 @@ +package com.mogo.och.bus.passenger.ui + +import android.os.Bundle +import com.mogo.commons.mvp.MvpFragment +import com.mogo.och.bus.passenger.R +import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionSoftPresenter + +/** + * @author: yangyakun + * @date: 2023/1/28 + */ +class BusPassengerFunctionSoftFragment : + MvpFragment() { + + override fun getLayoutId(): Int = R.layout.bus_p_function_setting_soft_fragment + + override fun getTagName(): String = TAG + + override fun initViews() { + + } + + override fun createPresenter(): BusPassengerFunctionSoftPresenter = + BusPassengerFunctionSoftPresenter(this) + + companion object { + const val TAG = "BusPassengerFunctionSoftFragment" + @JvmStatic + fun newInstance(): BusPassengerFunctionSoftFragment { + val args = Bundle() + val fragment = BusPassengerFunctionSoftFragment() + fragment.arguments = args + return fragment + } + } +} \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionVideoFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionVideoFragment.kt new file mode 100644 index 0000000000..951906fc49 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerFunctionVideoFragment.kt @@ -0,0 +1,40 @@ +package com.mogo.och.bus.passenger.ui + +import android.os.Bundle +import com.mogo.commons.mvp.MvpFragment +import com.mogo.och.bus.passenger.R +import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionVideoPresenter + +/** + * @author: yangyakun + * @date: 2023/1/28 + */ +class BusPassengerFunctionVideoFragment : + MvpFragment() { + override fun getLayoutId(): Int { + return R.layout.bus_p_function_video_fragment + } + + override fun getTagName(): String { + return TAG + } + + override fun initViews() { + + } + + override fun createPresenter(): BusPassengerFunctionVideoPresenter { + return BusPassengerFunctionVideoPresenter(this) + } + + companion object { + const val TAG = "BusPassengerFunctionVideoFragment" + @JvmStatic + fun newInstance(): BusPassengerFunctionVideoFragment { + val args = Bundle() + val fragment = BusPassengerFunctionVideoFragment() + fragment.arguments = args + return fragment + } + } +} \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt index 1dacbaec9a..e7c888f417 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt +++ b/OCH/mogo-och-bus-passenger/src/m1/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.kt @@ -1,9 +1,20 @@ package com.mogo.och.bus.passenger.ui +import androidx.fragment.app.DialogFragment +import androidx.fragment.app.Fragment import com.mogo.commons.mvp.MvpFragment +import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.map.CallerSmpManager.hidePanel +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.och.bus.passenger.R import com.mogo.och.bus.passenger.presenter.BusPassengerPresenter +import com.mogo.och.common.module.biz.provider.LoginServiceImpl +import kotlinx.android.synthetic.m1.bus_p_fragment.* +import java.lang.ref.WeakReference /** * @author: wangmingjun @@ -11,12 +22,9 @@ import com.mogo.och.bus.passenger.presenter.BusPassengerPresenter */ class BusPassengerRouteFragment : MvpFragment() { - /** - * 改变自动驾驶状态 - * - * @param status 2 - running 1 - enable 2 - disable - */ - private val mPrevAPStatus = -1 + + private var bpFunctionGroupDialogFragment: WeakReference? = null + override fun getLayoutId(): Int { return R.layout.bus_p_fragment } @@ -28,6 +36,53 @@ class BusPassengerRouteFragment : override fun initViews() { //隐藏小地图 hidePanel() + cb_bp_video_player.onClick { + openSettingPage(BusPassengerFunctionFragment.VIDEOTAB) + } + cb_bp_setting_soft.onClick { + openSettingPage(BusPassengerFunctionFragment.SETTINGSOFTTAB) + } + cb_bp_setting_device.onClick { + openSettingPage(BusPassengerFunctionFragment.SETTINGDEVICETAB) + } + } + + private fun openSettingPage(tab:String) { + + CallerHmiManager.hideToolsView() + val fragmentByTag: Fragment? = childFragmentManager.findFragmentByTag(BusPassengerFunctionFragment.TAG) + if (fragmentByTag is DialogFragment) { + if (fragmentByTag.dialog != null && fragmentByTag.dialog!!.isShowing) { + return + } + if (fragmentByTag.dialog != null && fragmentByTag.isAdded) { + if (AppStateManager.currentActivity() == null) { // 没有在当前应用内 在启动页面关闭应用 + CallerLogger.d(SceneConstant.M_TAXI + LoginServiceImpl.TAG, "showLoginDialogFragment 权限验证") + return + } + } + } + + if (bpFunctionGroupDialogFragment?.get() == null) { + bpFunctionGroupDialogFragment = WeakReference(BusPassengerFunctionFragment.newInstance()) + } + val bpFunctionGroup = bpFunctionGroupDialogFragment?.get() + bpFunctionGroup?.arguments?.putString(BusPassengerFunctionFragment.SELECTTAB,tab) + 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, LoginServiceImpl.TAG) + CallerLogger.d(SceneConstant.M_TAXI + LoginServiceImpl.TAG, "showLoginDialogFragment 展示登录界面") + }else{ + CallerLogger.d(SceneConstant.M_TAXI + LoginServiceImpl.TAG, "showLoginDialogFragment 展示登录界面 1s内执行一次") + } + } } override fun createPresenter(): BusPassengerPresenter { @@ -35,6 +90,6 @@ class BusPassengerRouteFragment : } companion object { - private val TAG = BusPassengerRouteFragment::class.java.simpleName + private const val TAG = "BusPassengerRouteFragment" } } \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_chufa_nor.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_chufa_nor.png new file mode 100644 index 0000000000..ba5fbb1a83 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_chufa_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_chufa_press.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_chufa_press.png new file mode 100644 index 0000000000..53add816af Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_chufa_press.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_guanchemen_nor.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_guanchemen_nor.png new file mode 100644 index 0000000000..5520b392f6 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_guanchemen_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_guanchemen_press.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_guanchemen_press.png new file mode 100644 index 0000000000..70a5c12ffb Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_guanchemen_press.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaichemen_nor.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaichemen_nor.png new file mode 100644 index 0000000000..574749feb2 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaichemen_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaichemen_press.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaichemen_press.png new file mode 100644 index 0000000000..a5b4cf8c14 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaichemen_press.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaobantingche_press.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaobantingche_press.png new file mode 100644 index 0000000000..615eb4407c Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaobantingche_press.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaobiantingche_nor.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaobiantingche_nor.png new file mode 100644 index 0000000000..09a5a51bf6 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/m1_kaobiantingche_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml index 77d9ef65f8..7902470d2c 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml +++ b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_fragment.xml @@ -1,6 +1,36 @@ + android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto"> + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_fragment.xml b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_fragment.xml new file mode 100644 index 0000000000..c6827b22a8 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_fragment.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_devices_fragment.xml b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_devices_fragment.xml new file mode 100644 index 0000000000..567be6b213 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_devices_fragment.xml @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_soft_fragment.xml b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_soft_fragment.xml new file mode 100644 index 0000000000..d765f6a2ff --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_setting_soft_fragment.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_video_fragment.xml b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_video_fragment.xml new file mode 100644 index 0000000000..2c0f2890ad --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/layout/bus_p_function_video_fragment.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/values/styles.xml b/OCH/mogo-och-bus-passenger/src/m1/res/values/styles.xml new file mode 100644 index 0000000000..d1f31905d6 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/values/styles.xml @@ -0,0 +1,24 @@ + + + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/ui/TaxiLoginDialogFragment.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/ui/TaxiLoginDialogFragment.kt index 3b3ea53932..cac280afa6 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/ui/TaxiLoginDialogFragment.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/ui/TaxiLoginDialogFragment.kt @@ -203,6 +203,10 @@ class TaxiLoginDialogFragment : return OchCommonLoginPresenter(this) } + override fun getTagName(): String { + return TAG + } + companion object { private const val COUNTS = 4 // 点击次数 private const val DURATION: Long = 1000 // 规定有效时间 diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java index 137ff803fa..decb6b1f7f 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiPersonalDialogFragment.java @@ -100,6 +100,11 @@ public class TaxiPersonalDialogFragment extends return new TaxiOperationalPresenter(this); } + @Override + public String getTagName() { + return TAG; + } + @Override public void dismissAllowingStateLoss() { super.dismissAllowingStateLoss(); diff --git a/app/productFlavors/fPadLenovoOchBusPassenger.gradle b/app/productFlavors/fPadLenovoOchBusPassenger.gradle index 0f08cb0fee..fee09bf5c4 100644 --- a/app/productFlavors/fPadLenovoOchBusPassenger.gradle +++ b/app/productFlavors/fPadLenovoOchBusPassenger.gradle @@ -32,6 +32,6 @@ project.android.productFlavors { buildConfigField 'boolean', 'IS_DEMO_MODE', 'false' // 构建 是否支持多屏异显异交互 - buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true' + buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false' } } \ No newline at end of file diff --git a/app/productFlavors/fPadLenovoOchBusPassengerM1.gradle b/app/productFlavors/fPadLenovoOchBusPassengerM1.gradle index e901ca36b8..3a7820ea00 100644 --- a/app/productFlavors/fPadLenovoOchBusPassengerM1.gradle +++ b/app/productFlavors/fPadLenovoOchBusPassengerM1.gradle @@ -32,6 +32,6 @@ project.android.productFlavors { buildConfigField 'boolean', 'IS_DEMO_MODE', 'false' // 构建 是否支持多屏异显异交互 - buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true' + buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false' } } \ No newline at end of file diff --git a/app/productFlavors/fPadLenovoOchBusPassengerM2.gradle b/app/productFlavors/fPadLenovoOchBusPassengerM2.gradle index e2882740d1..5575a2133a 100644 --- a/app/productFlavors/fPadLenovoOchBusPassengerM2.gradle +++ b/app/productFlavors/fPadLenovoOchBusPassengerM2.gradle @@ -32,6 +32,6 @@ project.android.productFlavors { buildConfigField 'boolean', 'IS_DEMO_MODE', 'false' // 构建 是否支持多屏异显异交互 - buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true' + buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false' } } \ No newline at end of file diff --git a/app/productFlavors/fPadLenovoOchBusShuttle.gradle b/app/productFlavors/fPadLenovoOchBusShuttle.gradle index 3271f6ecf2..f6869ae54f 100644 --- a/app/productFlavors/fPadLenovoOchBusShuttle.gradle +++ b/app/productFlavors/fPadLenovoOchBusShuttle.gradle @@ -37,6 +37,6 @@ project.android.productFlavors { buildConfigField 'boolean', 'IS_DEMO_MODE', 'false' // 构建 是否支持多屏异显异交互 - buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true' + buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false' } } \ No newline at end of file diff --git a/app/productFlavors/fPadLenovoOchBusShuttlePassenger.gradle b/app/productFlavors/fPadLenovoOchBusShuttlePassenger.gradle index d2cdf0e1d1..91b24202ee 100644 --- a/app/productFlavors/fPadLenovoOchBusShuttlePassenger.gradle +++ b/app/productFlavors/fPadLenovoOchBusShuttlePassenger.gradle @@ -35,6 +35,6 @@ project.android.productFlavors { buildConfigField 'boolean', 'IS_DEMO_MODE', 'false' // 构建 是否支持多屏异显异交互 - buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true' + buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'false' } } \ No newline at end of file diff --git a/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpDialogFragment.java b/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpDialogFragment.java index bcd2e6412a..a700a8d6fe 100644 --- a/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpDialogFragment.java +++ b/foudations/mogo-commons/src/main/java/com/mogo/commons/mvp/MvpDialogFragment.java @@ -76,6 +76,13 @@ public abstract class MvpDialogFragment< V extends IView, P extends Presenter< V @NonNull protected abstract P createPresenter(); + /** + * 获取绑定的TAG标记 + * + * @return 返回唯一TAG标记 + */ + public abstract String getTagName(); + @Nullable protected < T extends View > T findViewById( int id ) { if ( mRootView != null ) {