[6.1.0]
[feat] [启动自驾背景动态变更]
This commit is contained in:
@@ -4,9 +4,11 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.elegant.utils.UiThreadHandler
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
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
|
||||
@@ -25,8 +27,7 @@ import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.starting_
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.taxi_p_autopilot_btn_bg
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.taxi_p_autopilot_starting
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.taxi_p_start_autopilot
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.v_xiaozhi_belt_info_bg
|
||||
import java.util.Arrays
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.cl_car_type
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -214,6 +215,15 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
taxi_p_start_autopilot?.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
if(HdMapBuildConfig.currentCarVrIconRes == R.raw.hq_h9){
|
||||
cl_car_type.setBackgroundResource(R.drawable.taxi_p_start_panel__hq_bg)
|
||||
}else{
|
||||
cl_car_type.setBackgroundResource(R.drawable.taxi_p_start_panel__df_bg)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val viewModel = ViewModelProvider(this).get(StartAutopilotViewModel::class.java)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 420 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 418 KiB |
@@ -2,9 +2,10 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/cl_car_type"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/taxi_p_passenger_start_panel_bg"
|
||||
android:background="@drawable/taxi_p_start_panel__df_bg"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -4,10 +4,12 @@ import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.res.ResourcesCompat
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.elegant.utils.UiThreadHandler
|
||||
import com.mogo.eagle.core.data.config.HdMapBuildConfig
|
||||
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
|
||||
@@ -26,6 +28,7 @@ import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.starting_
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.taxi_p_autopilot_btn_bg
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.taxi_p_autopilot_starting
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.taxi_p_start_autopilot
|
||||
import kotlinx.android.synthetic.main.taxi_p_start_autopilot_view.view.cl_car_type
|
||||
|
||||
/**
|
||||
* @author: wangmingjun
|
||||
@@ -201,6 +204,17 @@ class StartAutopilotView : WindowRelativeLayout, StartAutopilotViewModel.StartAu
|
||||
taxi_p_start_autopilot?.text = resources.getString(R.string.taxi_p_start_autopilot_txt)
|
||||
}
|
||||
|
||||
|
||||
override fun onVisibilityChanged(changedView: View, visibility: Int) {
|
||||
super.onVisibilityChanged(changedView, visibility)
|
||||
if(HdMapBuildConfig.currentCarVrIconRes == R.raw.hq_h9){
|
||||
cl_car_type.setBackgroundResource(R.drawable.taxi_p_start_panel__hq_bg)
|
||||
}else{
|
||||
cl_car_type.setBackgroundResource(R.drawable.taxi_p_start_panel__df_bg)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val viewModel = ViewModelProvider(this).get(StartAutopilotViewModel::class.java)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 420 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 418 KiB |
@@ -4,7 +4,8 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/taxi_p_passenger_start_panel_bg"
|
||||
android:id="@+id/cl_car_type"
|
||||
android:background="@drawable/taxi_p_start_panel__df_bg"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<ImageView
|
||||
|
||||
Reference in New Issue
Block a user