Commit b2caea245eed8325d5ca13fc85029dd1d6b3eaa3
1 parent
468e8757
1 优化滑动卡片
Showing
2 changed files
with
3 additions
and
3 deletions
config.gradle
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| @@ -184,7 +184,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -184,7 +184,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 184 | StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); | 184 | StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); |
| 185 | 185 | ||
| 186 | } | 186 | } |
| 187 | - } else { | 187 | + } else if (slideOffset!=0){ |
| 188 | if (fragment.binding.flTop.getVisibility() == View.VISIBLE) { | 188 | if (fragment.binding.flTop.getVisibility() == View.VISIBLE) { |
| 189 | QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); | 189 | QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); |
| 190 | StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); | 190 | StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); |
| @@ -192,7 +192,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -192,7 +192,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| 194 | //设置卡片缩放特效 | 194 | //设置卡片缩放特效 |
| 195 | - if (slideOffset >= 0 && slideOffset <= 1) { | 195 | + if (slideOffset >= 0 && slideOffset <= 0.6) { |
| 196 | int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 15) / 0.6); | 196 | int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 15) / 0.6); |
| 197 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); | 197 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); |
| 198 | int current = (int) (leakWidth * slideOffset); | 198 | int current = (int) (leakWidth * slideOffset); |