[add] 预警类型图片资源添加

This commit is contained in:
liujing
2021-03-29 12:02:26 +08:00
parent 50fcf04df6
commit 7a95ecd63a
3 changed files with 12 additions and 0 deletions

View File

@@ -62,6 +62,18 @@ public class V2XWarningWindow extends V2XBasWindow implements IV2XWindow {
public void show(Object entity) {
if (entity != null) {
mV2XWarningEntity = (V2XWarningEntity) entity;
//行人0/自行车1/摩托车2/小汽车3/公交车4
switch (mV2XWarningEntity.getType()) {
case 0:
typeImage.setImageResource(R.drawable.v2x_road_front_p_warning);
break;
case 1:
case 2:
typeImage.setImageResource(R.drawable.v2x_road_front_p_warning);
break;
default:
break;
}
distance.setText(String.valueOf(mV2XWarningEntity.getDistance()) + "");
warningTextView.setText(mV2XWarningEntity.getTipContent());
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice(mV2XWarningEntity.getTts());

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB