[6.7.0]UI细节调整

This commit is contained in:
xuxinchao
2024-10-11 10:56:13 +08:00
parent 5bcc92031c
commit 5d10b1c008
19 changed files with 48 additions and 62 deletions

View File

@@ -8,7 +8,6 @@ import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.DataSourceType
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
@@ -213,15 +212,15 @@ class MsgBoxTabAdapter(private val activity: Activity) :
when(receiveFaultLevel[0]){
0->{
//重度预警样式
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_stop_normal))
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_severe_warning))
}
1,2,3->{
//中度预警样式
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_reduce_normal))
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_moderate_warning))
}
4,5->{
//轻度预警样式
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_warning_normal))
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_mild_warning))
}
}
receiveFaultLevel.forEach {level->
@@ -248,7 +247,7 @@ class MsgBoxTabAdapter(private val activity: Activity) :
}else{
holder.tvFmAction.text = "建议操作:暂无"
//轻度预警样式
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_warning_normal))
holder.ivFmImage.setImageDrawable(getDrawable(R.drawable.icon_fm_mild_warning))
}
}
//故障策略
@@ -342,18 +341,18 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
) {
//Error
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_error))
holder.tvReportLevel.text = "Error"
} else if(reportEntity.resultList.contains(RESULT_AUTOPILOT_INFERIOR)
|| reportEntity.resultList.contains(RESULT_SHOW_WARNING)
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_INFERIOR)
){
//Warning
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_warning))
holder.tvReportLevel.text = "Warning"
}else {
//INFO
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_info_normal))
holder.ivReportImage.setImageDrawable(getDrawable(R.drawable.icon_report_info))
holder.tvReportLevel.text = "Info"
}
@@ -499,11 +498,6 @@ class MsgBoxTabAdapter(private val activity: Activity) :
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
holder.tvV2XContent.text = v2XMsg.content
holder.ivV2XImage.setImageDrawable(ResourcesCompat.getDrawable(activity.resources,EventTypeEnumNew.getUpdateIconRes(v2XMsg.type),null))
if(v2XMsg.type== EventTypeEnumNew.TYPE_VERIFICATION_SUCCESSFUL.poiType||v2XMsg.type == EventTypeEnumNew.TYPE_DEVICE_STATUS_NORMAL.poiType){
holder.itemView.setBackgroundResource(R.drawable.bg_temp_v2x_success)
}else{
holder.itemView.setBackgroundResource(R.drawable.bg_msg_box_v2x)
}
if(v2XMsg.communicationType.isNullOrEmpty()){
holder.tvV2XTitle.text = EventTypeEnumNew.getEventTitle(v2XMsg.type)
}else{

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1,14 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clV2XLayout"
android:layout_width="match_parent"
android:layout_width="@dimen/dp_694"
android:layout_height="wrap_content"
android:minHeight="@dimen/dp_180"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/bg_msg_box_toast"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_7"
android:layout_marginBottom="@dimen/dp_7"
>
<ImageView
@@ -25,13 +22,12 @@
android:id="@+id/tvV2XTitle"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginStart="@dimen/dp_20"
android:textColor="#FFFFFFFF"
android:textSize="@dimen/sp_40"
android:textStyle="bold"
/>
<TextView
@@ -43,8 +39,7 @@
app:layout_constraintRight_toRightOf="parent"
android:textColor="@color/white"
android:textSize="@dimen/sp_32"
android:layout_marginTop="@dimen/dp_5"
android:paddingBottom="@dimen/dp_30"
android:layout_marginTop="@dimen/dp_6"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,17 +2,19 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingBottom="@dimen/dp_26">
<!--故障级别图标-->
<ImageView
android:id="@+id/ivFmImage"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:layout_width="@dimen/dp_152"
android:layout_height="@dimen/dp_152"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_14"
android:contentDescription="@string/fm_icon"
android:src="@drawable/icon_fm_mild_warning"
/>
<!--标题展示故障策略-->
@@ -20,10 +22,11 @@
android:id="@+id/tvFmTitle"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/ivFmImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivFmImage"
app:layout_constraintRight_toLeftOf="@id/tvFmShowStatus"
android:layout_marginStart="@dimen/dp_30"
android:layout_marginStart="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_26"
android:textSize="@dimen/sp_38"
android:textColor="@color/white"
/>
@@ -54,6 +57,7 @@
app:layout_constraintRight_toRightOf="@id/tvFmShowStatus"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:layout_marginTop="@dimen/dp_6"
/>
<!--建议操作-->
@@ -66,6 +70,7 @@
app:layout_constraintRight_toRightOf="@id/tvFmShowStatus"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:layout_marginTop="@dimen/dp_6"
/>
<!--故障策略-->
@@ -79,6 +84,7 @@
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_6"
/>
<!--故障原因-->
@@ -92,6 +98,7 @@
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_6"
/>
<!--后果-->
@@ -102,10 +109,10 @@
app:layout_constraintTop_toBottomOf="@id/tvFmReason"
app:layout_constraintLeft_toLeftOf="@id/tvFmReason"
app:layout_constraintRight_toRightOf="@id/tvFmShowStatus"
android:paddingBottom="@dimen/dp_30"
android:textColor="#CCCCCC"
android:textSize="@dimen/sp_32"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_6"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -2,15 +2,16 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingBottom="@dimen/dp_26">
<ImageView
android:id="@+id/ivReportImage"
android:layout_width="@dimen/dp_120"
android:layout_height="@dimen/dp_120"
android:layout_width="@dimen/dp_152"
android:layout_height="@dimen/dp_152"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginTop="@dimen/dp_40"
android:layout_marginTop="@dimen/dp_14"
android:contentDescription="@string/report_icon"
/>
@@ -18,12 +19,13 @@
android:id="@+id/tvReportLevel"
android:layout_width="@dimen/dp_0"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="@id/ivReportImage"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/ivReportImage"
app:layout_constraintRight_toLeftOf="@id/tvReportShowStatus"
android:textColor="@color/white"
android:textSize="@dimen/sp_38"
android:layout_marginStart="@dimen/dp_30"
android:layout_marginStart="@dimen/dp_14"
android:layout_marginTop="@dimen/dp_26"
/>
<TextView
@@ -35,6 +37,7 @@
app:layout_constraintRight_toRightOf="@id/tvReportShowStatus"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:layout_marginTop="@dimen/dp_6"
/>
<TextView
@@ -46,6 +49,7 @@
app:layout_constraintRight_toRightOf="@id/tvReportShowStatus"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:layout_marginTop="@dimen/dp_6"
/>
<TextView
@@ -58,6 +62,7 @@
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_6"
/>
<TextView
@@ -70,6 +75,7 @@
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_6"
/>
<TextView
@@ -79,10 +85,10 @@
app:layout_constraintTop_toBottomOf="@id/tvReportSrc"
app:layout_constraintLeft_toLeftOf="@id/tvReportSrc"
app:layout_constraintRight_toRightOf="@id/tvReportShowStatus"
android:paddingBottom="@dimen/dp_30"
android:textSize="@dimen/sp_32"
android:textColor="#CCCCCC"
android:visibility="gone"
android:layout_marginTop="@dimen/dp_6"
/>
<TextView
@@ -96,7 +102,6 @@
android:textSize="@dimen/sp_32"
android:textColor="#2EACFF"
android:paddingTop="@dimen/dp_20"
android:paddingBottom="@dimen/dp_20"
android:paddingLeft="@dimen/dp_30"
/>

View File

@@ -7,7 +7,7 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvBubbleList"
android:layout_width="@dimen/dp_654"
android:layout_width="@dimen/dp_694"
android:layout_height="wrap_content"
/>

View File

@@ -34,13 +34,11 @@
android:id="@+id/tvFaultTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/fault_open_time"
android:textColor="@color/white"
android:textSize="@dimen/sp_32"
app:layout_constraintTop_toTopOf="@id/tvFaultTitle"
app:layout_constraintBottom_toBottomOf="@id/tvFaultTitle"
app:layout_constraintEnd_toEndOf="@id/viewTitleBg"
android:layout_marginEnd="@dimen/dp_30"
app:layout_constraintRight_toRightOf="@id/tvFaultType"
/>
<View
@@ -275,7 +273,7 @@
app:layout_constraintLeft_toLeftOf="@id/etNoteInput"
app:layout_constraintTop_toBottomOf="@id/etNoteInput"
android:layout_marginTop="@dimen/dp_39"
android:background="@drawable/bg_fault_report"
android:background="@drawable/bg_work_order"
android:text="@string/fault_report"
android:textColor="#FFFFFF"
android:textSize="@dimen/sp_32"

View File

@@ -88,7 +88,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginTop="@dimen/dp_20"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginStart="@dimen/dp_66"
android:layout_marginEnd="@dimen/dp_66"
android:layout_marginBottom="@dimen/dp_216"

View File

@@ -25,10 +25,10 @@
android:textSize="@dimen/sp_40"
android:textColor="#CCFFFFFF"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="@id/view_title_bg"
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="@id/view_title_bg"
android:layout_marginStart="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_55"
/>
<TextView
@@ -38,10 +38,9 @@
android:text="@string/fault_open_time"
android:textColor="@color/white"
android:textSize="@dimen/sp_32"
app:layout_constraintTop_toTopOf="@id/view_title_bg"
app:layout_constraintBottom_toBottomOf="@id/view_title_bg"
app:layout_constraintEnd_toEndOf="@id/view_title_bg"
android:layout_marginEnd="@dimen/dp_53"
app:layout_constraintTop_toTopOf="@id/tv_report_title"
app:layout_constraintBottom_toBottomOf="@id/tv_report_title"
app:layout_constraintEnd_toEndOf="@id/wrap_radio_group"
/>
<View
@@ -270,7 +269,7 @@
android:layout_height="@dimen/dp_80"
app:layout_constraintTop_toBottomOf="@id/et_describe_input"
app:layout_constraintLeft_toLeftOf="@id/et_describe_input"
android:background="@drawable/bg_fault_report"
android:background="@drawable/bg_work_order"
android:text="@string/work_order_report"
android:textColor="#FFFFFF"
android:textSize="@dimen/sp_36"