测试代码修改
字段名称修改 UI
This commit is contained in:
@@ -89,7 +89,7 @@ public class NoticeBannerView extends ConstraintLayout {
|
||||
noticeBannerCheck.setOnClickListener(v -> {
|
||||
mNoticeTrafficDialog = new NoticeTrafficDialog(mContext, mPushData);
|
||||
mNoticeTrafficDialog.show();
|
||||
WarningFloat.dismiss(WaringConst.MODULE_NAME);
|
||||
// WarningFloat.dismiss(WaringConst.MODULE_NAME);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
private TextView connect;//连接
|
||||
private NoticeTrafficAdapter adapter;
|
||||
private ArrayList dataArrayList = new ArrayList();
|
||||
private NoticeTrafficStyleInfo.NoticeTrafficStyleInfoResult mTrafficStyleInfo;
|
||||
private NoticeTrafficStyleInfo.NoticeTrafficAccountInfo mTrafficStyleInfo;
|
||||
|
||||
public NoticeTrafficDialog(@NonNull Context context, NoticeTrafficStylePushData pushData) {
|
||||
super(context);
|
||||
@@ -368,19 +368,19 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
@Override
|
||||
public void callBackWithResult(NoticeTrafficStyleInfo trafficInfo) {
|
||||
Log.d(TAG, "交通事故详情::" + trafficInfo);
|
||||
mTrafficStyleInfo = trafficInfo.getResult();
|
||||
mTrafficStyleInfo = trafficInfo.getResult().getAccidentInfo();
|
||||
infoRefresh(mTrafficStyleInfo);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void infoRefresh(NoticeTrafficStyleInfo.NoticeTrafficStyleInfoResult info) {
|
||||
private void infoRefresh(NoticeTrafficStyleInfo.NoticeTrafficAccountInfo info) {
|
||||
if (dataArrayList.size() > 0) {
|
||||
dataArrayList.clear();
|
||||
}
|
||||
NoticeValue laiYuan = new NoticeValue();
|
||||
laiYuan.setKey("事故来源:");
|
||||
laiYuan.setValue("--");
|
||||
laiYuan.setValue(info.getUploadType());
|
||||
dataArrayList.add(laiYuan);
|
||||
|
||||
NoticeValue zeRen = new NoticeValue();
|
||||
@@ -410,7 +410,11 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
|
||||
NoticeValue status = new NoticeValue();
|
||||
status.setKey("处理状态:");
|
||||
status.setValue(info.getOperaStatus());
|
||||
if (info.getOperaStatus() == "0"){
|
||||
status.setValue("待处理");
|
||||
}else {
|
||||
status.setValue("已处理");
|
||||
}
|
||||
dataArrayList.add(status);
|
||||
|
||||
NoticeValue location = new NoticeValue();
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
android:id="@+id/thumbnail_image"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:src="@drawable/notice_traffic_placeholder"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/notice_traffic_placeholder"
|
||||
app:layout_constraintBottom_toBottomOf="@id/video_player"
|
||||
app:layout_constraintEnd_toEndOf="@id/video_player"
|
||||
app:layout_constraintStart_toStartOf="@id/video_player"
|
||||
@@ -84,7 +84,7 @@
|
||||
android:id="@+id/traffic_info_recyclerView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="@dimen/dp_80"
|
||||
android:layout_marginLeft="@dimen/dp_70"
|
||||
android:layout_marginTop="@dimen/dp_38"
|
||||
android:layout_marginRight="@dimen/dp_80"
|
||||
android:layout_marginBottom="@dimen/dp_40"
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
<dimen name="dp_54">54px</dimen>
|
||||
<dimen name="dp_56">56px</dimen>
|
||||
<dimen name="dp_62">62px</dimen>
|
||||
<dimen name="dp_70">70px</dimen>
|
||||
<dimen name="dp_75">80px</dimen>
|
||||
<dimen name="dp_80">80px</dimen>
|
||||
<dimen name="dp_140">140px</dimen>
|
||||
<dimen name="dp_150">150px</dimen>
|
||||
<dimen name="dp_180">180px</dimen>
|
||||
|
||||
@@ -81,7 +81,7 @@ public class NoticeNetWorkManager {
|
||||
@Override
|
||||
public void onNext(@NonNull NoticeTrafficStyleInfo noticeTrafficStyleInfo) {
|
||||
Log.d(TAG, "onNext:"+noticeTrafficStyleInfo);
|
||||
if (noticeTrafficStyleInfo != null) {
|
||||
if (noticeTrafficStyleInfo.getResult().getAccidentInfo() != null) {
|
||||
callBack.callBackWithResult(noticeTrafficStyleInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class TestNoticeBroadcastReceiver : BroadcastReceiver() {
|
||||
val video: String = "https://view.2amok.com/20200219/012d8e2a55f227e90d76056bb6aab5e4.mp4"
|
||||
pushData.poiImgUrl = video
|
||||
pushData.type = 1
|
||||
pushData.infoId = "909821120032526336"
|
||||
pushData.infoId = "909754135789686784"
|
||||
CallerHmiManager.showTrafficBanner(pushData)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user