From 7cdd460ba0184db1defe20e96db42358abcd8957 Mon Sep 17 00:00:00 2001 From: Admin <Dana_Lee1016@126.com> Date: 星期一, 12 四月 2021 10:38:49 +0800 Subject: [PATCH] basesdat --- app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java | 42 +++++++++++++++++++++++++++++------------- 1 files changed, 29 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java b/app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java index 66d0450..7049c8d 100644 --- a/app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java +++ b/app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java @@ -162,6 +162,7 @@ while (iterator.hasNext()){ Map.Entry<BaseDataUIBean.TYPE_,MapInfoHead>entry = iterator.next(); MapInfoHead mapInfoHead = entry.getValue(); + BaseDataUIBean.TYPE_ key = entry.getKey(); Log.i(TAG,"key= " + entry.getKey() + " and value= " + entry.getValue()); if (mapInfoHead!=null){ String str = mapInfoHead.getStr(); @@ -170,20 +171,23 @@ entry.getKey()== BaseDataUIBean.TYPE_.car?"鏇存柊杞﹁締妯″瀷":(entry.getKey()== BaseDataUIBean.TYPE_.road?"鏇存柊閬撹矾鍦板浘":"鏇存柊鍦哄湴鍦板浘") ,1, entry.getKey())); if (str.contains("澶辫触")){ - showMannualMapCar(); + showMannualMapCar(key); } }else{ - showMannualMapCar(); + Log.i(TAG,"TextUtils.isEmpty(str)"); + showMannualMapCar(key); } }else{ - showMannualMapCar(); + Log.i(TAG,"mapInfoHead == null"); + showMannualMapCar(key); } } }else{ - showMannualMapCar(); + Log.i(TAG,"hashMaps == null"); + showMannualMapCar(null); } gpsInfoAdapter.addAll(datas); @@ -197,19 +201,31 @@ } }; - private void showMannualMapCar() { + private void showMannualMapCar(BaseDataUIBean.TYPE_ key) { 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 (key == null){ + 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)); + } + }else{ + if (key == BaseDataUIBean.TYPE_.car){ + datas.add(new BaseDataUIBean(str2SpannableString("鎵嬪姩璁剧疆杞﹁締 "),R.mipmap.platform_pic,str2FouregourdSpannableString(carModelPath),"",1,null)); + } if (key == BaseDataUIBean.TYPE_.road){ + datas.add(new BaseDataUIBean(str2SpannableString("鎵嬪姩璁剧疆閬撹矾 "),R.mipmap.platform_pic,str2FouregourdSpannableString(roadMapPath),"",1,null)); + } if (key == BaseDataUIBean.TYPE_.yard){ + datas.add(new BaseDataUIBean(str2SpannableString("鎵嬪姩璁剧疆鍦哄湴 "),R.mipmap.platform_pic,str2FouregourdSpannableString(MapPath),"",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)); - } + + } -- Gitblit v1.8.0