[6.4.4]调整连接进度显示View显示

This commit is contained in:
xuxinchao
2024-06-11 18:55:30 +08:00
parent 2de0ec84e2
commit d988e789bf
7 changed files with 27 additions and 11 deletions

View File

@@ -60,6 +60,7 @@
<!--APP、MAP版本-->
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
android:id="@+id/viewVersionName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="45dp"
@@ -309,8 +310,8 @@
<com.mogo.eagle.core.function.hmi.ui.widget.ConnectionProcessView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_58"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_18"
app:layout_constraintBottom_toTopOf="@id/viewVersionName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>

View File

@@ -67,6 +67,7 @@
<!--APP、MAP版本-->
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
android:id="@+id/viewVersionName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="45dp"
@@ -348,8 +349,8 @@
<com.mogo.eagle.core.function.hmi.ui.widget.ConnectionProcessView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_58"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_18"
app:layout_constraintBottom_toTopOf="@id/viewVersionName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>

View File

@@ -57,6 +57,7 @@
<!--APP、MAP版本-->
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
android:id="@+id/viewVersionName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="45dp"
@@ -354,8 +355,8 @@
<com.mogo.eagle.core.function.hmi.ui.widget.ConnectionProcessView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_58"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_18"
app:layout_constraintBottom_toTopOf="@id/viewVersionName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>

View File

@@ -94,6 +94,7 @@
<!--APP、MAP版本-->
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
android:id="@+id/viewVersionName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="45dp"
@@ -353,8 +354,8 @@
<com.mogo.eagle.core.function.hmi.ui.widget.ConnectionProcessView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_58"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_18"
app:layout_constraintBottom_toTopOf="@id/viewVersionName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>

View File

@@ -92,6 +92,7 @@
<!--APP、MAP版本-->
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
android:id="@+id/viewVersionName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="45dp"
@@ -355,8 +356,8 @@
<com.mogo.eagle.core.function.hmi.ui.widget.ConnectionProcessView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_58"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_18"
app:layout_constraintBottom_toTopOf="@id/viewVersionName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
/>

View File

@@ -208,8 +208,10 @@ class ConnectionProcessView @JvmOverloads constructor(
private fun showIPCConnectSuccessView(){
ThreadUtils.runOnUiThread {
this.visibility = View.VISIBLE
pbConnectionProgress.setPadding(5,3,5,8)
pbConnectionProgress.progressDrawable = ContextCompat.getDrawable(context, R.drawable.connection_progress_style)
pbConnectionProgress.progress = 25
tvConnectionStatus.setPadding(0,0,0,10)
tvConnectionStatus.text = "系统启动中..."
clConnectionTip.visibility = View.GONE
}
@@ -221,8 +223,10 @@ class ConnectionProcessView @JvmOverloads constructor(
private fun showSSMConnectSuccessView(){
ThreadUtils.runOnUiThread{
this.visibility = View.VISIBLE
pbConnectionProgress.setPadding(5,3,5,8)
pbConnectionProgress.progressDrawable = ContextCompat.getDrawable(context, R.drawable.connection_progress_style)
pbConnectionProgress.progress = 50
tvConnectionStatus.setPadding(0,0,0,10)
tvConnectionStatus.text = "系统启动中..."
clConnectionTip.visibility = View.GONE
}
@@ -234,8 +238,10 @@ class ConnectionProcessView @JvmOverloads constructor(
private fun showAutopilotReadySuccessView(){
ThreadUtils.runOnUiThread{
this.visibility = View.VISIBLE
pbConnectionProgress.setPadding(0,0,0,0)
pbConnectionProgress.progressDrawable = ContextCompat.getDrawable(context, R.drawable.connection_success_style)
pbConnectionProgress.progress = 100
tvConnectionStatus.setPadding(0,0,0,0)
tvConnectionStatus.text = "系统启动成功"
clConnectionTip.visibility = View.GONE
}
@@ -247,8 +253,10 @@ class ConnectionProcessView @JvmOverloads constructor(
private fun showIPCConnectFailView(){
ThreadUtils.runOnUiThread {
this.visibility = View.VISIBLE
pbConnectionProgress.setPadding(0,0,0,0)
pbConnectionProgress.progressDrawable = ContextCompat.getDrawable(context, R.drawable.connection_fail_style)
pbConnectionProgress.progress = 25
tvConnectionStatus.setPadding(0,0,0,0)
tvConnectionStatus.text = "系统启动异常"
clConnectionTip.visibility = View.VISIBLE
tvConnectionTipTitle.text = "Telematics连接异常"
@@ -262,8 +270,10 @@ class ConnectionProcessView @JvmOverloads constructor(
private fun showSSMConnectFailView(){
ThreadUtils.runOnUiThread {
this.visibility = View.VISIBLE
pbConnectionProgress.setPadding(0,0,0,0)
pbConnectionProgress.progressDrawable = ContextCompat.getDrawable(context, R.drawable.connection_fail_style)
pbConnectionProgress.progress = 50
tvConnectionStatus.setPadding(0,0,0,0)
tvConnectionStatus.text = "系统启动异常"
clConnectionTip.visibility = View.VISIBLE
tvConnectionTipTitle.text = "SSM连接异常"
@@ -277,8 +287,10 @@ class ConnectionProcessView @JvmOverloads constructor(
private fun showAutopilotReadyFailView(){
ThreadUtils.runOnUiThread {
this.visibility = View.VISIBLE
pbConnectionProgress.setPadding(0,0,0,0)
pbConnectionProgress.progressDrawable = ContextCompat.getDrawable(context, R.drawable.connection_fail_style)
pbConnectionProgress.progress = 100
tvConnectionStatus.setPadding(0,0,0,0)
tvConnectionStatus.text = "系统启动异常"
clConnectionTip.visibility = View.VISIBLE
tvConnectionTipTitle.text = "系统冷启动异常"

View File

@@ -32,7 +32,6 @@
android:textSize="@dimen/sp_32"
android:textColor="@color/white"
android:elevation="@dimen/dp_10"
android:paddingBottom="@dimen/dp_10"
/>
<androidx.constraintlayout.widget.ConstraintLayout