[1.0.0]
[m1] [m1初始提交]
@@ -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
|
||||
|
||||
@@ -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<BusPassengerFunctionDeviceFragment?>(view)
|
||||
@@ -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<BusPassengerFunctionFragment?>(view)
|
||||
@@ -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<BusPassengerFunctionSoftFragment?>(view)
|
||||
@@ -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<BusPassengerFunctionVideoFragment?>(view)
|
||||
@@ -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<BusPassengerFunctionDeviceFragment?, BusPassengerFunctionDevicePresenter?>() {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<BusPassengerFunctionFragment?, BusPassengerFunctionPresenter?>() {
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<BusPassengerFunctionSoftFragment?, BusPassengerFunctionSoftPresenter?>() {
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<BusPassengerFunctionVideoFragment?, BusPassengerFunctionVideoPresenter?>() {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<BusPassengerRouteFragment?, BusPassengerPresenter?>() {
|
||||
/**
|
||||
* 改变自动驾驶状态
|
||||
*
|
||||
* @param status 2 - running 1 - enable 2 - disable
|
||||
*/
|
||||
private val mPrevAPStatus = -1
|
||||
|
||||
private var bpFunctionGroupDialogFragment: WeakReference<BusPassengerFunctionFragment>? = 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"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 14 KiB |
@@ -1,6 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cb_bp_video_player"
|
||||
android:src="@drawable/m1_chufa_nor"
|
||||
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="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cb_bp_setting_soft"
|
||||
android:src="@drawable/m1_guanchemen_nor"
|
||||
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="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/cb_bp_setting_device"
|
||||
android:src="@drawable/m1_kaichemen_nor"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_setting_soft"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
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_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_bp_video_player"
|
||||
android:background="@drawable/m1_chufa_nor"
|
||||
android:button="@null"
|
||||
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="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_bp_setting_soft"
|
||||
android:background="@drawable/m1_guanchemen_nor"
|
||||
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="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cb_bp_setting_device"
|
||||
android:background="@drawable/m1_kaichemen_nor"
|
||||
android:button="@null"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/cb_bp_setting_soft"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/holo_red_light"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
|
||||
<TextView
|
||||
android:text="devices"
|
||||
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.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/holo_green_dark"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<TextView
|
||||
android:text="soft"
|
||||
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.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/holo_orange_dark"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<TextView
|
||||
android:text="video"
|
||||
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.constraintlayout.widget.ConstraintLayout>
|
||||
24
OCH/mogo-och-bus-passenger/src/m1/res/values/styles.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="DialogFullScreen" parent="Theme.AppCompat.Dialog">
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowOverscan">true</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:statusBarColor" tools:targetApi="lollipop">@android:color/transparent
|
||||
</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowEnterAnimation">@null</item>
|
||||
<item name="android:windowExitAnimation">@null</item>
|
||||
<item name="android:windowAnimationStyle">@null</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowTranslucentNavigation">false</item>
|
||||
<item name="android:windowFullscreen">false</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -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 // 规定有效时间
|
||||
|
||||
@@ -100,6 +100,11 @@ public class TaxiPersonalDialogFragment extends
|
||||
return new TaxiOperationalPresenter(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTagName() {
|
||||
return TAG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismissAllowingStateLoss() {
|
||||
super.dismissAllowingStateLoss();
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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'
|
||||
}
|
||||
}
|
||||
@@ -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 ) {
|
||||
|
||||