Commit b2caea245eed8325d5ca13fc85029dd1d6b3eaa3

Authored by 杨帅
1 parent 468e8757

1 优化滑动卡片

config.gradle
@@ -21,7 +21,7 @@ ext { @@ -21,7 +21,7 @@ ext {
21 //编译方式 21 //编译方式
22 debug : false, 22 debug : false,
23 //版本号 23 //版本号
24 - version: "0.6.12", 24 + version: "0.6.13",
25 //Lib库前缀 25 //Lib库前缀
26 packeg : "com.cnlive.module", 26 packeg : "com.cnlive.module",
27 //Lib库名称 27 //Lib库名称
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);