From f78f899b75d3dd0afe0c27e22a07fa391e50f2fc Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Sun, 19 Jan 2020 16:51:06 +0800 Subject: [PATCH 1/3] opt --- .../com/mogo/module/tanlu/fragment/TanluCardViewFragment.java | 2 -- modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml | 2 +- .../mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java index b9fec430d4..6147526d59 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java @@ -571,7 +571,6 @@ public class TanluCardViewFragment extends MvpFragment> //判断是图片还是视频,第一个时,上一个不可点击 Log.e(TAG, " tv_previous_res --1-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size()); if (currentPosition < 0) { -// return; currentPosition = markerExploreWayList.size(); } currentPosition--; @@ -583,7 +582,6 @@ public class TanluCardViewFragment extends MvpFragment> //判断是图片还是视频,最后一个时,下一个不可点击 Log.e(TAG, " tv_next_res --1-> currentPosition = " + currentPosition + " >> size= " + markerExploreWayList.size()); if (currentPosition >= markerExploreWayList.size()) { -// return; currentPosition = 0; } currentPosition++; diff --git a/modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml index 4e2517d37d..1369cbda37 100644 --- a/modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml +++ b/modules/mogo-module-tanlu/src/main/res/values-ldpi/dimens.xml @@ -38,7 +38,7 @@ 109px 28px 45px - 45px + 42px 20px diff --git a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml b/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml index c6f46c0772..ed17bded92 100644 --- a/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml +++ b/modules/mogo-module-tanlu/src/main/res/values-xhdpi/dimens.xml @@ -35,9 +35,9 @@ 20px 300px 90px - 75px + 122px 205px - 25px + 50px 90px 80px From 24ed7886ef0a30fb8a97cbd5ab5e0243c9d4a1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Sun, 19 Jan 2020 17:05:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=80=A7?= =?UTF-8?q?=E5=88=AB=E7=9A=84=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/module/common/entity/MarkerUserInfo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java index ec6271c154..8f297b2c43 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerUserInfo.java @@ -82,6 +82,9 @@ public class MarkerUserInfo implements Serializable { } public String getGender() { + if (TextUtils.isEmpty(gender)) { + return "未知"; + } return gender; } From f7770f03e9906b20914872465aa2aca84a44f1fa Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Sun, 19 Jan 2020 17:25:36 +0800 Subject: [PATCH 3/3] opt code --- .../tanlu/fragment/TanluCardViewFragment.java | 18 +++++++++++------- .../module/tanlu/model/TanluModelData.java | 3 --- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java index 6147526d59..1a3fa6b377 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java @@ -399,6 +399,7 @@ public class TanluCardViewFragment extends MvpFragment> private void handleMarkerExploreWay(MarkerExploreWay markerExploreWay) { if (markerExploreWay != null) { + Log.d(TAG, "markerExploreWay.getFileType() =" + markerExploreWay.getFileType()); if (markerExploreWay.getFileType() == 0) { //图片 refreshPhotoData(markerExploreWay); } else if (markerExploreWay.getFileType() == 1) { //视频 @@ -601,9 +602,10 @@ public class TanluCardViewFragment extends MvpFragment> autoZoomInImageView.post(new Runnable() { @Override public void run() { - //放大增量是0.3,放大时间是1000毫秒,放大开始时间是600毫秒以后 + Log.d(TAG, "handleImageAnimation run -------->"); + //放大增量是0.3,放大时间是1000毫秒,放大开始时间是500毫秒以后 autoZoomInImageView.init() - .startZoomInByScaleDeltaAndDuration(0.2f, 1000, 500); + .startZoomInByScaleDeltaAndDuration(0.2f, 1000, 300); } }); } @@ -683,16 +685,18 @@ public class TanluCardViewFragment extends MvpFragment> mDistanceTv.setText(handleDistance(markerExploreWay.getDistance())); mTimeTv.setText(formatDate(markerExploreWay.getGenerateTime())); String thumbnailUrl = markerExploreWay.getItems().get(0).getUrl(); - Logger.d(TAG, "refreshPhotoData thumbnailUrl ------>" + thumbnailUrl); + Logger.d(TAG, "refreshPhoto thumbnailUrl ------>" + thumbnailUrl); autoZoomInImageView.setVisibility(View.VISIBLE); simpleCoverVideoPlayer.setVisibility(View.GONE); mogoImageloader.downloadImage(getActivity(), thumbnailUrl, new IMogoImageLoaderListener() { @Override public void onStart() { + Log.d(TAG, "onStart ------>"); } @Override public void onCompleted(Bitmap bitmap) { + Log.d(TAG, "onCompleted ------>bitmap = " + bitmap); autoZoomInImageView.setImageBitmap(bitmap); //动画 handleImageAnimation(); @@ -700,7 +704,7 @@ public class TanluCardViewFragment extends MvpFragment> @Override public void onFailure(Exception e) { - Logger.e(TAG, "onFailure ------>" + e); + Log.e(TAG, "onFailure ------>" + e); } }); } @@ -1042,7 +1046,7 @@ public class TanluCardViewFragment extends MvpFragment> inputlon = lon; inputlat = lat; - Logger.d(TAG, "getVoiceControlRoadData lat =" + lat + ">>>lon =" + lon + ">>>cityCode= " + cityCode + " >>>adCode = " + adCode); + Log.d(TAG, "getVoiceControlRoadData lat =" + lat + ">>>lon =" + lon + ">>>cityCode= " + cityCode + " >>>adCode = " + adCode); mTanluModelData.getVoiceControlRoadData(keywords, cityCode, lon, lat, adCode, new VoiceSearchCallback() { @Override public void onSuccess(VoiceSearchResult o) { @@ -1091,7 +1095,7 @@ public class TanluCardViewFragment extends MvpFragment> .longitude(informationList.get(i).lon); optionList.add(options); - Log.e(TAG, "lat =" + informationList.get(i).lat + ">>>lon =" + informationList.get(i).lon); + Log.d(TAG, "lat =" + informationList.get(i).lat + ">>>lon =" + informationList.get(i).lon); } Logger.d(TAG, "getVoiceControlRoadData optionList.size() = " + optionList.size()); mMarkerManager.addMarkers(TanluConstants.MODEL_NAME, optionList, true); @@ -1129,7 +1133,7 @@ public class TanluCardViewFragment extends MvpFragment> markerExploreWayList.add(markerExploreWay); } - Log.e(TAG, "convertData markerExploreWayList.size() =" + markerExploreWayList.size()); + Log.d(TAG, "convertData markerExploreWayList.size() =" + markerExploreWayList.size()); } /** diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java index 0a9e1f27a9..1a34d8ad11 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/model/TanluModelData.java @@ -181,9 +181,6 @@ public class TanluModelData { Gson gson = new Gson(); NaviLatLng coordinates = new NaviLatLng(getNaviInfo(lon, lat).fromStart(), getNaviInfo(lon, lat).toEnd()); Logger.d(TAG, "getNavigationLineData -------> " + getSn()); - if (coordinates == null) { - return; - } List list = new ArrayList<>(); list.add(lon);