| | |
| | | Iterator<Map .Entry<BaseDataUIBean.TYPE_,MapInfoHead>> iterator = hashMaps.entrySet().iterator(); |
| | | while (iterator.hasNext()){ |
| | | Map.Entry<BaseDataUIBean.TYPE_,MapInfoHead>entry = iterator.next(); |
| | | MapInfoHead mapInfoHead = entry.getValue(); |
| | | Log.i(TAG,"key= " + entry.getKey() + " and value= " + entry.getValue()); |
| | | datas.add(new BaseDataUIBean(str2SpannableString(entry.getValue().getStr()),R.mipmap.province_id,str2FouregourdSpannableString(getResources().getString(R.string.mapversion)+entry.getValue().getVersion()), |
| | | entry.getKey()== BaseDataUIBean.TYPE_.car?"更新车辆模型":(entry.getKey()== BaseDataUIBean.TYPE_.road?"更新道路地图":"更新场地地图") |
| | | ,1, entry.getKey())); |
| | | if (mapInfoHead!=null){ |
| | | String str = mapInfoHead.getStr(); |
| | | if (!TextUtils.isEmpty(str)){ |
| | | datas.add(new BaseDataUIBean(str2SpannableString(entry.getValue().getStr()),R.mipmap.province_id,str2FouregourdSpannableString(getResources().getString(R.string.mapversion)+entry.getValue().getVersion()), |
| | | entry.getKey()== BaseDataUIBean.TYPE_.car?"更新车辆模型":(entry.getKey()== BaseDataUIBean.TYPE_.road?"更新道路地图":"更新场地地图") |
| | | ,1, entry.getKey())); |
| | | if (str.contains("失败")){ |
| | | showMannualMapCar(); |
| | | |
| | | } |
| | | }else{ |
| | | showMannualMapCar(); |
| | | } |
| | | }else{ |
| | | showMannualMapCar(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | }; |
| | | |
| | | private void showMannualMapCar() { |
| | | String roadMapPath = ExamPlatformData.getInstance().getRoadMapPath(); |
| | | String MapPath = ExamPlatformData.getInstance().getMapPath(); |
| | | String carModelPath = ExamPlatformData.getInstance().getCarModelPath(); |
| | | if (!TextUtils.isEmpty(roadMapPath)){ |
| | | datas.add(new BaseDataUIBean(str2SpannableString("手动设置道路 "),R.mipmap.platform_pic,str2FouregourdSpannableString(roadMapPath),"",1,null)); |
| | | } |
| | | if (!TextUtils.isEmpty(MapPath)){ |
| | | datas.add(new BaseDataUIBean(str2SpannableString("手动设置场地 "),R.mipmap.platform_pic,str2FouregourdSpannableString(MapPath),"",1,null)); |
| | | } |
| | | if (!TextUtils.isEmpty(carModelPath)){ |
| | | datas.add(new BaseDataUIBean(str2SpannableString("手动设置车辆 "),R.mipmap.platform_pic,str2FouregourdSpannableString(carModelPath),"",1,null)); |
| | | } |
| | | } |
| | | |
| | | |
| | | private String left(String s,int pos){ |