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 index 5e967233e6..5a09429f26 100644 --- 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 @@ -1,9 +1,11 @@ package com.mogo.och.bus.passenger.ui import android.os.Bundle +import android.view.View import com.mogo.commons.mvp.MvpFragment import com.mogo.och.bus.passenger.R import com.mogo.och.bus.passenger.presenter.BusPassengerFunctionSoftPresenter +import kotlinx.android.synthetic.m1.bus_p_function_setting_soft_fragment.* /** * @author: yangyakun @@ -17,7 +19,56 @@ class BusPassengerFunctionSoftFragment : override fun getTagName(): String = TAG override fun initViews() { + rg_select_function.setOnCheckedChangeListener { group, checkedId -> + when (checkedId) { + R.id.tv_setting_aircondition -> { + g_aircondition_setting.visibility = View.VISIBLE + g_light_setting.visibility = View.GONE + g_voice_setting.visibility = View.GONE + } + R.id.tv_setting_lighting -> { + g_light_setting.visibility = View.VISIBLE + g_voice_setting.visibility = View.GONE + g_aircondition_setting.visibility = View.GONE + } + R.id.tv_setting_voice -> { + g_voice_setting.visibility = View.VISIBLE + g_aircondition_setting.visibility = View.GONE + g_light_setting.visibility = View.GONE + } + else -> {} + } + } + rg_select_function.check(R.id.tv_setting_aircondition) + tv_light_top_01.setOnCheckedChangeListener { buttonView, isChecked -> + setLightImage(isChecked,tv_light_top_02.isChecked,tv_light_atmosphere.isChecked) + } + tv_light_top_02.setOnCheckedChangeListener { buttonView, isChecked -> + setLightImage(tv_light_top_01.isChecked,isChecked,tv_light_atmosphere.isChecked) + } + tv_light_atmosphere.setOnCheckedChangeListener { buttonView, isChecked -> + setLightImage(tv_light_top_01.isChecked,tv_light_top_02.isChecked,isChecked) + } + } + private fun setLightImage(leftLight:Boolean, rightLight:Boolean, atmosphereLight:Boolean){ + if(leftLight&&rightLight){ + iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_middle_selected)// 都打开 + }else if(!leftLight&&!rightLight){ + iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_nor)// 都关闭 + }else { + if(leftLight){ + iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_select_left)// 左面开 + } + if(rightLight){ + iv_top_light_setting.setImageResource(R.drawable.bus_p_function_light_select_right)// 左面开 + } + } + if(atmosphereLight){ + iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_select) + }else{ + iv_bottom_light_setting.setImageResource(R.drawable.bus_p_function_atmosphere_nor) + } } override fun createPresenter(): BusPassengerFunctionSoftPresenter = diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_nor.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_nor.png new file mode 100644 index 0000000000..04f54122a8 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_select.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_select.png new file mode 100644 index 0000000000..aa8b7c97b5 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_select.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_selected.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_selected.png new file mode 100644 index 0000000000..2d6daa4e2f Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_aircondition_selected.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_nor.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_nor.png new file mode 100644 index 0000000000..ba84e6a740 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_select.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_select.png new file mode 100644 index 0000000000..99ef0dbded Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_atmosphere_select.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_left_bg_selected.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_left_bg_selected.png new file mode 100644 index 0000000000..4e1cf125c7 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_left_bg_selected.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_check_select.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_check_select.png new file mode 100644 index 0000000000..f94ff34044 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_check_select.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_check_selected.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_check_selected.png new file mode 100644 index 0000000000..99868fe176 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_check_selected.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_middle_selected.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_middle_selected.png new file mode 100644 index 0000000000..dc0eea28ad Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_middle_selected.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_nor.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_nor.png new file mode 100644 index 0000000000..99ab3d63b4 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_nor.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select.png new file mode 100644 index 0000000000..08053627ac Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_left.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_left.png new file mode 100644 index 0000000000..1f5acfea92 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_left.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_right.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_right.png new file mode 100644 index 0000000000..32a0cd4ca9 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_select_right.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_selected.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_selected.png new file mode 100644 index 0000000000..fa968a6599 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_selected.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_switch_bg_selected.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_switch_bg_selected.png new file mode 100644 index 0000000000..87b10cea51 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_light_switch_bg_selected.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_voice_select.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_voice_select.png new file mode 100644 index 0000000000..4171a49a81 Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_voice_select.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_voice_selected.png b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_voice_selected.png new file mode 100644 index 0000000000..a83e8cf32e Binary files /dev/null and b/OCH/mogo-och-bus-passenger/src/m1/res/drawable-nodpi/bus_p_function_voice_selected.png differ diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_aircondition_left_select.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_aircondition_left_select.xml new file mode 100644 index 0000000000..a5891f6e9a --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_aircondition_left_select.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_aircondition_left_selected.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_aircondition_left_selected.xml new file mode 100644 index 0000000000..4e723fdddd --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_aircondition_left_selected.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_bg_selector.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_bg_selector.xml new file mode 100644 index 0000000000..fb21cf89b7 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_bg_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_left_selector.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_left_selector.xml new file mode 100644 index 0000000000..0213900747 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_left_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_text_color_selector.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_text_color_selector.xml new file mode 100644 index 0000000000..8969eb4381 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_airconditon_text_color_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_left_bg_select.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_left_bg_select.xml new file mode 100644 index 0000000000..0ce82325c4 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_left_bg_select.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_select.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_select.xml new file mode 100644 index 0000000000..f6465bef43 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_select.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_selected.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_selected.xml new file mode 100644 index 0000000000..b71ccb54d0 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_selected.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_selector.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_selector.xml new file mode 100644 index 0000000000..88955ede2c --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_left_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_switch_bg_select.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_switch_bg_select.xml new file mode 100644 index 0000000000..7c2e4bbe47 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_switch_bg_select.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_switch_bg_selector.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_switch_bg_selector.xml new file mode 100644 index 0000000000..af0603520e --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_light_switch_bg_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_setting_soft_b_shape.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_setting_soft_b_shape.xml index 9303f53b0b..7197abdc70 100644 --- a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_setting_soft_b_shape.xml +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_setting_soft_b_shape.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_select.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_select.xml new file mode 100644 index 0000000000..d95d6d617f --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_select.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_selected.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_selected.xml new file mode 100644 index 0000000000..5a82a77718 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_selected.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_selector.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_selector.xml new file mode 100644 index 0000000000..f05ee861f9 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_switch_left_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_select.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_select.xml new file mode 100644 index 0000000000..0204cda01d --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_select.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_selected.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_selected.xml new file mode 100644 index 0000000000..c8105281a2 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_selected.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_selector.xml b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_selector.xml new file mode 100644 index 0000000000..2bad5e8cd7 --- /dev/null +++ b/OCH/mogo-och-bus-passenger/src/m1/res/drawable/bus_p_function_voice_left_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ 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 index 34379199e7..1dad4ded5e 100644 --- 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 @@ -1,6 +1,7 @@ @@ -14,33 +15,204 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintWidth_percent="0.78125"> - + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="@+id/gl_right" + app:layout_constraintTop_toBottomOf="@+id/tv_light_top_02" /> + + + + + + + + + + + + + + +