Commit 33123841f9bb81b2d6353f0cab1edf2ed6a605d6
1 parent
493fcecf
1 修复小米mix2s滑动卡片显示异常问题
Showing
5 changed files
with
4 additions
and
12 deletions
config.gradle
moudle_pedometer/src/main/java/com/cnlive/moudle/calorie/service/CalorieService.java
| @@ -146,10 +146,6 @@ public class CalorieService extends Service implements SensorEventListener { | @@ -146,10 +146,6 @@ public class CalorieService extends Service implements SensorEventListener { | ||
| 146 | @SuppressLint("WrongConstant") | 146 | @SuppressLint("WrongConstant") |
| 147 | @Override | 147 | @Override |
| 148 | public int onStartCommand(Intent intent, int flags, int startId) { | 148 | public int onStartCommand(Intent intent, int flags, int startId) { |
| 149 | - | ||
| 150 | - if (!EventBus.getDefault().isRegistered(this)) { | ||
| 151 | - EventBus.getDefault().register(this); | ||
| 152 | - } | ||
| 153 | userId = CommonInfo.getUserId(getApplicationContext()); | 149 | userId = CommonInfo.getUserId(getApplicationContext()); |
| 154 | if (userId != null && !TextUtils.isEmpty(userId)) { | 150 | if (userId != null && !TextUtils.isEmpty(userId)) { |
| 155 | //初始化数据库 | 151 | //初始化数据库 |
| @@ -163,10 +159,7 @@ public class CalorieService extends Service implements SensorEventListener { | @@ -163,10 +159,7 @@ public class CalorieService extends Service implements SensorEventListener { | ||
| 163 | } | 159 | } |
| 164 | }).start(); | 160 | }).start(); |
| 165 | startTimeCount(); | 161 | startTimeCount(); |
| 166 | - } else { | ||
| 167 | - EventBus.getDefault().post(new MessageEvent(Constant.START_TRACE_GATHER_FAIL, "")); | ||
| 168 | } | 162 | } |
| 169 | - | ||
| 170 | flags = START_STICKY; | 163 | flags = START_STICKY; |
| 171 | return super.onStartCommand(intent, flags, startId); | 164 | return super.onStartCommand(intent, flags, startId); |
| 172 | } | 165 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunRaceDetailFragmentView.java
| @@ -161,7 +161,7 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen | @@ -161,7 +161,7 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen | ||
| 161 | //隐藏空视图 | 161 | //隐藏空视图 |
| 162 | fragment.binding.emptyLayout.setVisibility(View.GONE); | 162 | fragment.binding.emptyLayout.setVisibility(View.GONE); |
| 163 | //设置底部卡片第一次可滑动的位置 | 163 | //设置底部卡片第一次可滑动的位置 |
| 164 | - fragment.binding.slidingLayout.setAnchorPoint(0.6f); | 164 | + fragment.binding.slidingLayout.setAnchorPoint(0.5f); |
| 165 | 165 | ||
| 166 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { | 166 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { |
| 167 | @Override | 167 | @Override |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/OnGoingFragmentView.java
| @@ -144,7 +144,7 @@ public class OnGoingFragmentView implements MvpView { | @@ -144,7 +144,7 @@ public class OnGoingFragmentView implements MvpView { | ||
| 144 | //显示立即报名按钮 | 144 | //显示立即报名按钮 |
| 145 | // fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); | 145 | // fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); |
| 146 | //设置底部卡片第一次可滑动的位置 | 146 | //设置底部卡片第一次可滑动的位置 |
| 147 | - fragment.binding.slidingLayout.setAnchorPoint(0.6f); | 147 | + fragment.binding.slidingLayout.setAnchorPoint(0.5f); |
| 148 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { | 148 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { |
| 149 | @Override | 149 | @Override |
| 150 | public void onPanelSlide(View panel, float slideOffset) { | 150 | public void onPanelSlide(View panel, float slideOffset) { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| @@ -219,7 +219,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -219,7 +219,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 219 | // fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); | 219 | // fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); |
| 220 | 220 | ||
| 221 | //设置底部卡片第一次可滑动的位置 | 221 | //设置底部卡片第一次可滑动的位置 |
| 222 | - fragment.binding.slidingLayout.setAnchorPoint(0.6f); | 222 | + fragment.binding.slidingLayout.setAnchorPoint(0.5f); |
| 223 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); | 223 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); |
| 224 | layoutParams.setMargins(ScreenUtil.dip2px(getContext(), 15), 0, ScreenUtil.dip2px(getContext(), 15), 0); | 224 | layoutParams.setMargins(ScreenUtil.dip2px(getContext(), 15), 0, ScreenUtil.dip2px(getContext(), 15), 0); |
| 225 | fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); | 225 | fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); |
| @@ -375,7 +375,6 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -375,7 +375,6 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 375 | // }); | 375 | // }); |
| 376 | //显示底部滑动卡片 | 376 | //显示底部滑动卡片 |
| 377 | fragment.binding.slidingLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); | 377 | fragment.binding.slidingLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); |
| 378 | - fragment.binding.scrollView.scrollTo(0, 0); | ||
| 379 | if (!TextUtils.isEmpty(runRaceDetailInfo.getE_subtitle())) { | 378 | if (!TextUtils.isEmpty(runRaceDetailInfo.getE_subtitle())) { |
| 380 | fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 210)); | 379 | fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 210)); |
| 381 | } else { | 380 | } else { |