[charter]
[滴声音修改、UI修改、魔方(och)迁移]
This commit is contained in:
yangyakun
2023-10-10 18:03:34 +08:00
parent 1c87683ec2
commit 52aa46cda8
36 changed files with 61 additions and 61 deletions

View File

@@ -1,12 +1,12 @@
package com.mogo.och.common.module.wigets
package com.magic.mogo.och.charter.view
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
import com.magic.mogo.och.charter.R
import com.mogo.eagle.core.utilcode.kotlin.onClick
import com.mogo.eagle.core.utilcode.util.ActivityUtils
import com.mogo.och.common.module.R
import com.mogo.och.common.module.manager.DriverMoFangFunctionManager
import com.mogo.och.common.module.manager.devicemanage.LightAirconditionDoorManager
import com.mogo.och.common.module.utils.SoundPoolHelper
@@ -48,11 +48,11 @@ class DriverMoFangFunctionView @JvmOverloads constructor(
}
openDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(true)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.beep)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
closeDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(false)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.beep)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/charter_brake_stop" android:state_pressed="true" />
<item android:drawable="@drawable/charter_brake_stop" android:state_focused="true" />
<item android:drawable="@drawable/charter_brake_stop_un" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/charter_close_door_selected" android:state_pressed="true" />
<item android:drawable="@drawable/charter_close_door_selected" android:state_focused="true" />
<item android:drawable="@drawable/charter_close_door_normal" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/charter_moderate" android:state_pressed="true" />
<item android:drawable="@drawable/charter_moderate" android:state_focused="true" />
<item android:drawable="@drawable/charter_moderate_un" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/charter_open_door_selected" android:state_pressed="true" />
<item android:drawable="@drawable/charter_open_door_selected" android:state_focused="true" />
<item android:drawable="@drawable/charter_open_door_normal" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/charter_reset" android:state_pressed="true" />
<item android:drawable="@drawable/charter_reset" android:state_focused="true" />
<item android:drawable="@drawable/charter_reset_un" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/charter_whistle" android:state_pressed="true" />
<item android:drawable="@drawable/charter_whistle" android:state_focused="true" />
<item android:drawable="@drawable/charter_whistle_un" />
</selector>

View File

@@ -13,7 +13,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--魔方控制+开关门-->
<com.mogo.och.common.module.wigets.DriverMoFangFunctionView
<com.magic.mogo.och.charter.view.DriverMoFangFunctionView
android:layout_width="1116dp"
android:layout_height="@dimen/dp_278"
android:layout_marginTop="@dimen/dp_32"

View File

@@ -14,7 +14,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/moderate_btn_selector"/>
android:src="@drawable/charter_moderate_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/brakeStopIv"
@@ -23,7 +23,7 @@
app:layout_constraintLeft_toRightOf="@+id/moderateIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/brake_stop_btn_selector"/>
android:src="@drawable/charter_brake_stop_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/resetIv"
@@ -32,7 +32,7 @@
app:layout_constraintLeft_toRightOf="@+id/brakeStopIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/reset_btn_selector"/>
android:src="@drawable/charter_reset_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/whistleIv"
@@ -41,7 +41,7 @@
app:layout_constraintLeft_toRightOf="@+id/resetIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/whistle_btn_selector"/>
android:src="@drawable/charter_whistle_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/closeDoorIv"
@@ -50,7 +50,7 @@
app:layout_constraintLeft_toRightOf="@+id/whistleIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/close_door_btn_selector"/>
android:src="@drawable/charter_close_door_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/openDoorIv"
@@ -59,6 +59,6 @@
app:layout_constraintLeft_toRightOf="@+id/closeDoorIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/open_door_btn_selector"/>
android:src="@drawable/charter_open_door_selector"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -23,6 +23,6 @@ class CloseDoorView @JvmOverloads constructor(
private fun go2OpenDoor(){
LightAirconditionDoorManager.go2OpenDoor(false)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
}

View File

@@ -97,7 +97,7 @@ class GoViewWithArrive @JvmOverloads constructor(
}
else -> {}
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
override fun onDetachedFromWindow() {

View File

@@ -23,7 +23,7 @@ class OpenDoorView @JvmOverloads constructor(
private fun go2OpenDoor(){
LightAirconditionDoorManager.go2OpenDoor(true)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
}

View File

@@ -45,6 +45,6 @@ class StopSiteView @JvmOverloads constructor(
}
else -> {}
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.m1_voice_di)
}
}

View File

@@ -329,7 +329,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
rv_aircondition_temperature.tag = null
return
} else {
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
}
openAircondition()
}
@@ -346,7 +346,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
.observeOn(AndroidSchedulers.mainThread()).subscribe {
tv_light_top_01.isEnabled = true
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
viewModel?.setLightData1(isChecked)
setLightTop1View(isChecked, true)
setLightView(isChecked, tv_light_top_02.isChecked)
@@ -360,7 +360,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
.observeOn(AndroidSchedulers.mainThread()).subscribe {
tv_light_top_02.isEnabled = true
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
viewModel?.setLightData2(isChecked)
setLightTop2View(isChecked, true)
setLightView(tv_light_top_01.isChecked, isChecked)
@@ -374,7 +374,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
.observeOn(AndroidSchedulers.mainThread()).subscribe {
tv_light_atmosphere.isEnabled = true
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
viewModel?.setAtmosphereLightData2(isChecked)
setLightAtmosphereView(isChecked, true)
}
@@ -539,7 +539,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
if (!buttonView.isPressed) {
return@setOnCheckedChangeListener
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
if (isChecked) {//打开
tv_aircondition_switch.setText("关闭空调")
if (rg_setting_pattern.checkedRadioButtonId == R.id.rb_pattern_heating) {
@@ -562,7 +562,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
if (!rb_pattern_heating.isPressed) {
return@setOnCheckedChangeListener
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
openHeater()
}
@@ -570,7 +570,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
if (!rb_pattern_automatic.isPressed) {
return@setOnCheckedChangeListener
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
openAircondition()
}
@@ -578,7 +578,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
if (!rb_pattern_refrigeration.isPressed) {
return@setOnCheckedChangeListener
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
openAircondition()
}
@@ -586,7 +586,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
if (!rb_pattern_ventilate.isPressed) {
return@setOnCheckedChangeListener
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
openAircondition()
}
@@ -622,7 +622,7 @@ class SoftControlView : ConstraintLayout, SoftControlViewModel.SoftControlCallba
else -> {}
}
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.bus_di)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(context, R.raw.m1_voice_di)
if (rg_setting_pattern.checkedRadioButtonId == R.id.rb_pattern_heating) {//暖风机
openHeater()
} else {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/brake_stop" android:state_pressed="true" />
<item android:drawable="@drawable/brake_stop" android:state_focused="true" />
<item android:drawable="@drawable/brake_stop_un" />
</selector>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/close_door_selected" android:state_pressed="true" />
<item android:drawable="@drawable/close_door_selected" android:state_focused="true" />
<item android:drawable="@drawable/close_door_normal" />
</selector>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/moderate" android:state_pressed="true" />
<item android:drawable="@drawable/moderate" android:state_focused="true" />
<item android:drawable="@drawable/moderate_un" />
</selector>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/open_door_selected" android:state_pressed="true" />
<item android:drawable="@drawable/open_door_selected" android:state_focused="true" />
<item android:drawable="@drawable/open_door_normal" />
</selector>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/reset_icon" android:state_pressed="true" />
<item android:drawable="@drawable/reset_icon" android:state_focused="true" />
<item android:drawable="@drawable/reset_un_icon" />
</selector>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/whistle" android:state_pressed="true" />
<item android:drawable="@drawable/whistle" android:state_focused="true" />
<item android:drawable="@drawable/whistle_un" />
</selector>