[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,59 +0,0 @@
package com.mogo.och.common.module.wigets
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
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
import kotlinx.android.synthetic.main.driver_mofang_function_view.view.*
/**
* @author: wangmingjun
* @date: 2023/4/20
*/
class DriverMoFangFunctionView @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null
) : ConstraintLayout(context, attrs) {
init {
LayoutInflater.from(context).inflate(R.layout.driver_mofang_function_view,this,true)
initClickEvent()
}
private fun initClickEvent() {
moderateIv.onClick {
DriverMoFangFunctionManager.driverMoFangFunctionManager.sendAcc(true,-1.0)
}
brakeStopIv.onClick {
DriverMoFangFunctionManager.driverMoFangFunctionManager.sendAcc(true,-2.0)
}
resetIv.onClick {
DriverMoFangFunctionManager.driverMoFangFunctionManager.reset()
}
whistleIv.onClick {
DriverMoFangFunctionManager.driverMoFangFunctionManager.sendOperatorSetHornByDriver()
}
whistleIv.setOnLongClickListener {
DriverMoFangFunctionManager.driverMoFangFunctionManager.sendOperatorSetHornByDriver()
true
}
openDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(true)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.beep)
}
closeDoorIv.onClick {
LightAirconditionDoorManager.go2OpenDoor(false)
SoundPoolHelper.getSoundPoolHelper().playSoundWithRedId(ActivityUtils.getActivityByContext(context), R.raw.beep)
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

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: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

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: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 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>

View File

@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="1116dp"
android:layout_height="@dimen/dp_278"
android:background="@drawable/driver_mofang_function_bg">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/moderateIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
android:layout_marginLeft="@dimen/dp_67"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/moderate_btn_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/brakeStopIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/moderateIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/brake_stop_btn_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/resetIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/brakeStopIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/reset_btn_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/whistleIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/resetIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/whistle_btn_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/closeDoorIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/whistleIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/close_door_btn_selector"/>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/openDoorIv"
android:layout_width="@dimen/dp_164"
android:layout_height="@dimen/dp_164"
app:layout_constraintLeft_toRightOf="@+id/closeDoorIv"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:src="@drawable/open_door_btn_selector"/>
</androidx.constraintlayout.widget.ConstraintLayout>