Commit a3662d3eaba928b58213ee8bb9c0f5afe9e77e34
1 parent
d55820bb
1 修改相关UI
Showing
4 changed files
with
15 additions
and
7 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/ALLScoreDetailFragmentView.java
| ... | ... | @@ -3,12 +3,15 @@ package com.cnlive.moudle.pedometer.frame.view; |
| 3 | 3 | import android.content.Context; |
| 4 | 4 | import android.text.TextUtils; |
| 5 | 5 | import android.view.View; |
| 6 | +import android.view.ViewGroup; | |
| 7 | +import android.widget.LinearLayout; | |
| 6 | 8 | |
| 7 | 9 | import com.baidu.mapapi.map.BaiduMap; |
| 8 | 10 | import com.baidu.mapapi.map.MapView; |
| 9 | 11 | import com.baidu.mapapi.map.UiSettings; |
| 10 | 12 | import com.cnlive.moudle.pedometer.model.RunningFinishBean; |
| 11 | 13 | import com.cnlive.moudle.pedometer.ui.fragment.ALLScoreDetailFragment; |
| 14 | +import com.cnlive.moudle.pedometer.utils.ScreenUtil; | |
| 12 | 15 | import com.cnlive.moudle.pedometer.utils.TimeUtil; |
| 13 | 16 | import com.example.moudle_pedometer.R; |
| 14 | 17 | import com.hannesdorfmann.mosby3.mvp.MvpView; |
| ... | ... | @@ -35,6 +38,10 @@ public class ALLScoreDetailFragmentView implements MvpView { |
| 35 | 38 | |
| 36 | 39 | public void initView(RunningFinishBean runningFinishBean) { |
| 37 | 40 | this.runningFinishBean = runningFinishBean; |
| 41 | + //设置滚动视图下边距 | |
| 42 | + ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) fragment.binding.scrollView.getLayoutParams(); | |
| 43 | + params.bottomMargin = ScreenUtil.dip2px(getContext(), 20); | |
| 44 | + fragment.binding.scrollView.setLayoutParams(params); | |
| 38 | 45 | //隐藏开始按钮 |
| 39 | 46 | fragment.binding.rlScrollViewStartBtn.setVisibility(View.GONE); |
| 40 | 47 | //设置标题 |
| ... | ... | @@ -53,7 +60,7 @@ public class ALLScoreDetailFragmentView implements MvpView { |
| 53 | 60 | } |
| 54 | 61 | //设置完成时间 |
| 55 | 62 | if (!TextUtils.isEmpty(runningFinishBean.getUserFinishTime())) { |
| 56 | - fragment.binding.includeFinishUserInfo.tvDate.setText(TimeUtil.getStampToTime(Long.parseLong(runningFinishBean.getUserFinishTime())*1000, "yyyy/MM/dd HH:mm")); | |
| 63 | + fragment.binding.includeFinishUserInfo.tvDate.setText(TimeUtil.getStampToTime(Long.parseLong(runningFinishBean.getUserFinishTime()) * 1000, "yyyy/MM/dd HH:mm")); | |
| 57 | 64 | } |
| 58 | 65 | //设置起点 |
| 59 | 66 | fragment.binding.includeFinishRunRoute.tvStartPoint.setText(runningFinishBean.getStartPoint()); |
| ... | ... | @@ -66,7 +73,7 @@ public class ALLScoreDetailFragmentView implements MvpView { |
| 66 | 73 | fragment.binding.includeFinishRunRoute.tvFinishState.setTextColor(getContext().getResources().getColor(R.color.green_round)); |
| 67 | 74 | } |
| 68 | 75 | //完成 |
| 69 | - else if ("0".equals(runningFinishBean.getIsFinish())){ | |
| 76 | + else if ("0".equals(runningFinishBean.getIsFinish())) { | |
| 70 | 77 | fragment.binding.includeFinishRunRoute.tvFinishState.setText("路线未完成"); |
| 71 | 78 | fragment.binding.includeFinishRunRoute.tvFinishState.setTextColor(getContext().getResources().getColor(R.color.red)); |
| 72 | 79 | } | ... | ... |
moudle_pedometer/src/main/res/layout/fragment_self_record.xml
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | android:id="@+id/ry_record" |
| 46 | 46 | android:layout_width="match_parent" |
| 47 | 47 | android:layout_height="wrap_content" |
| 48 | - android:layout_marginTop="10dp" | |
| 48 | + android:layout_marginTop="-15dp" | |
| 49 | 49 | android:background="@drawable/wdjl_backgroud" |
| 50 | 50 | android:padding="25dp"> |
| 51 | 51 | |
| ... | ... | @@ -69,7 +69,7 @@ |
| 69 | 69 | android:layout_width="wrap_content" |
| 70 | 70 | android:layout_height="wrap_content" |
| 71 | 71 | android:layout_centerHorizontal="true" |
| 72 | - android:layout_marginTop="20dp" | |
| 72 | + android:layout_marginTop="10dp" | |
| 73 | 73 | android:text="0.0" |
| 74 | 74 | android:textColor="@color/white" |
| 75 | 75 | android:textSize="50sp" /> |
| ... | ... | @@ -250,7 +250,6 @@ |
| 250 | 250 | android:layout_width="match_parent" |
| 251 | 251 | android:layout_height="wrap_content" |
| 252 | 252 | android:layout_marginLeft="10dp" |
| 253 | - android:layout_marginTop="10dp" | |
| 254 | 253 | android:layout_marginRight="10dp"> |
| 255 | 254 | |
| 256 | 255 | <TextView | ... | ... |
moudle_pedometer/src/main/res/layout/layout_finish_running_route.xml
moudle_pedometer/src/main/res/layout/layout_finish_user_info.xml
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | <LinearLayout |
| 10 | 10 | android:layout_width="match_parent" |
| 11 | - android:layout_height="200dp" | |
| 11 | + android:layout_height="190dp" | |
| 12 | 12 | android:layout_marginTop="30dp" |
| 13 | 13 | android:background="@drawable/shape_10dp_white_raduis_bg" |
| 14 | 14 | android:orientation="vertical"> |
| ... | ... | @@ -85,7 +85,9 @@ |
| 85 | 85 | <View |
| 86 | 86 | android:layout_width="match_parent" |
| 87 | 87 | android:layout_height="1dp" |
| 88 | + android:layout_marginLeft="10dp" | |
| 88 | 89 | android:layout_marginTop="10dp" |
| 90 | + android:layout_marginRight="10dp" | |
| 89 | 91 | android:background="@color/line" /> |
| 90 | 92 | <!--配速和用时--> |
| 91 | 93 | <LinearLayout | ... | ... |