Commit 01b8a423292b053960e2726f8ae059fec6f117af
分享图片大小修改2
Showing
7 changed files
with
32 additions
and
19 deletions
.idea/gradle.xml
| ... | ... | @@ -3,6 +3,9 @@ |
| 3 | 3 | <component name="GradleSettings"> |
| 4 | 4 | <option name="linkedExternalProjectsSettings"> |
| 5 | 5 | <GradleProjectSettings> |
| 6 | + <compositeConfiguration> | |
| 7 | + <compositeBuild compositeDefinitionSource="SCRIPT" /> | |
| 8 | + </compositeConfiguration> | |
| 6 | 9 | <option name="distributionType" value="DEFAULT_WRAPPED" /> |
| 7 | 10 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> |
| 8 | 11 | <option name="modules"> | ... | ... |
config.gradle
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunRaceDetailFragmentView.java
| ... | ... | @@ -281,7 +281,10 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen |
| 281 | 281 | if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy.MM.dd"))) { |
| 282 | 282 | fragment.binding.includeStreet.tvActiveEndTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy.MM.dd")); |
| 283 | 283 | } |
| 284 | - | |
| 284 | + //设置活动类型 | |
| 285 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getEventType())){ | |
| 286 | + fragment.binding.includeStreet.tvEventType.setText(runRaceDetailInfo.getEventType()); | |
| 287 | + } | |
| 285 | 288 | |
| 286 | 289 | //设置路线介绍的图片 |
| 287 | 290 | if (!TextUtils.isEmpty(runRaceDetailInfo.getRoadmap())) { |
| ... | ... | @@ -289,6 +292,10 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen |
| 289 | 292 | GlideApp.with(getContext()).load(runRaceDetailInfo.getRoadmap()).into(fragment.binding.includeStreetIntroduce.ivRoadMao); |
| 290 | 293 | |
| 291 | 294 | } |
| 295 | + //设置路线介绍 | |
| 296 | + if(!TextUtils.isEmpty(runRaceDetailInfo.getDescription())){ | |
| 297 | + fragment.binding.includeStreetIntroduce.tvStreetIntroduce.setText(runRaceDetailInfo.getDescription()); | |
| 298 | + } | |
| 292 | 299 | |
| 293 | 300 | //添加轨迹按钮点击事件 |
| 294 | 301 | fragment.binding.rlScrollViewAddTrace.setOnClickListener(new View.OnClickListener() { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollTraceListDetailFragmentView.java
| ... | ... | @@ -94,8 +94,6 @@ public class CollTraceListDetailFragmentView implements MvpView, OnFenceListener |
| 94 | 94 | this.position = position; |
| 95 | 95 | this.eventShoeLinesBean = eventShoeLinesBean; |
| 96 | 96 | allMapOverlays = new ArrayList<>(); |
| 97 | - //设置滑动卡片 | |
| 98 | -// fragment.binding.slidingLayout.set | |
| 99 | 97 | //添加起点 |
| 100 | 98 | CollectPoint startPoint = null; |
| 101 | 99 | List<CollectPoint> resultCollectPoints = null; | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/service/CollKeepLiveService.java
| ... | ... | @@ -51,14 +51,6 @@ public class CollKeepLiveService extends Service implements MediaPlayer.OnComple |
| 51 | 51 | public CollKeepLiveService() { |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - public static CollKeepLiveService getInstance() { | |
| 55 | - if (instance == null) { | |
| 56 | - instance = new CollKeepLiveService(); | |
| 57 | - return instance; | |
| 58 | - } else { | |
| 59 | - return instance; | |
| 60 | - } | |
| 61 | - } | |
| 62 | 54 | |
| 63 | 55 | @Override |
| 64 | 56 | public void onCreate() { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunMainFragmentView.java
| ... | ... | @@ -139,10 +139,6 @@ public class RunMainFragmentView implements MvpView { |
| 139 | 139 | long endTime = Long.parseLong(runRaceDetailInfo.getEndTime()); |
| 140 | 140 | StepUtil.setQueryTraceTime(getContext(), CommonInfo.getUserId(getContext()), startTime, endTime, runRaceDetailInfo.getEntityName()); |
| 141 | 141 | } |
| 142 | - //设置重要点 | |
| 143 | - if (TextUtils.isEmpty(userStepEntity.getImportPoint())) { | |
| 144 | - StepUtil.setImportPoints(getContext(), CommonInfo.getUserId(getContext()), runRaceDetailInfo.getLatLongitude()); | |
| 145 | - } | |
| 146 | 142 | //设置开始时间和赛事id |
| 147 | 143 | if (TextUtils.isEmpty(userStepEntity.getStreetId())) { |
| 148 | 144 | StepUtil.setStepStartData(getContext(), uid, TimeUtil.getNowTimeStamp(), CommonInfo.getStreetId(getContext())); | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunMainFragment.java
| ... | ... | @@ -12,6 +12,7 @@ import com.baidu.mapapi.model.LatLng; |
| 12 | 12 | import com.cnlive.libs.base.ui.QMUIFragment; |
| 13 | 13 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 14 | 14 | import com.cnlive.libs.base.util.StatusBarUtil2; |
| 15 | +import com.cnlive.moudle.collectionTrace.model.CollectPoint; | |
| 15 | 16 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; |
| 16 | 17 | import com.cnlive.moudle.pedometer.frame.presenter.RunMainFragmentPresenter; |
| 17 | 18 | import com.cnlive.moudle.pedometer.frame.view.RunMainFragmentView; |
| ... | ... | @@ -32,6 +33,7 @@ import org.greenrobot.eventbus.Subscribe; |
| 32 | 33 | import org.greenrobot.eventbus.ThreadMode; |
| 33 | 34 | |
| 34 | 35 | import java.io.Serializable; |
| 36 | +import java.util.ArrayList; | |
| 35 | 37 | import java.util.List; |
| 36 | 38 | |
| 37 | 39 | public class RunMainFragment extends QMUIFragment<RunMainFragmentView, RunMainFragmentPresenter, FragmentRunMainBinding> { |
| ... | ... | @@ -67,9 +69,24 @@ public class RunMainFragment extends QMUIFragment<RunMainFragmentView, RunMainFr |
| 67 | 69 | StepUtil.updateStepData(getActivity(), userStepEntity); |
| 68 | 70 | //获取数据库中的重要点 |
| 69 | 71 | String importStr = userStepEntity.getImportPoint(); |
| 70 | - if (TextUtils.isEmpty(runRaceDetailInfo.getLatLongitude())) { | |
| 71 | - //设置重要点 | |
| 72 | - StepUtil.setImportPoints(getActivity(), CommonInfo.getUserId(getActivity()), GsonUtil.GsonString(runRaceDetailInfo.getLatLongitude())); | |
| 72 | + //如果为空 | |
| 73 | + if (TextUtils.isEmpty(userStepEntity.getImportPoint())) { | |
| 74 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getLatLongitude())) { | |
| 75 | + List<CollectPoint> collectPoints = GsonUtil.jsonToList(runRaceDetailInfo.getLatLongitude(), CollectPoint.class); | |
| 76 | + List<LatLng> importLatLngs = new ArrayList<>(); | |
| 77 | + if (null != collectPoints && collectPoints.size() > 0) { | |
| 78 | + for (CollectPoint collectPoint : collectPoints) { | |
| 79 | + LatLng latLng = new LatLng(collectPoint.getLatitude(), collectPoint.getLongitude()); | |
| 80 | + if (null != latLng) { | |
| 81 | + importLatLngs.add(latLng); | |
| 82 | + } | |
| 83 | + } | |
| 84 | + } | |
| 85 | + if (null != importLatLngs && importLatLngs.size() > 0) { | |
| 86 | + //设置重要点 | |
| 87 | + StepUtil.setImportPoints(getActivity(), CommonInfo.getUserId(getActivity()), GsonUtil.GsonString(importLatLngs)); | |
| 88 | + } | |
| 89 | + } | |
| 73 | 90 | } |
| 74 | 91 | } |
| 75 | 92 | ... | ... |