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 | 146 | @SuppressLint("WrongConstant") |
| 147 | 147 | @Override |
| 148 | 148 | public int onStartCommand(Intent intent, int flags, int startId) { |
| 149 | - | |
| 150 | - if (!EventBus.getDefault().isRegistered(this)) { | |
| 151 | - EventBus.getDefault().register(this); | |
| 152 | - } | |
| 153 | 149 | userId = CommonInfo.getUserId(getApplicationContext()); |
| 154 | 150 | if (userId != null && !TextUtils.isEmpty(userId)) { |
| 155 | 151 | //初始化数据库 |
| ... | ... | @@ -163,10 +159,7 @@ public class CalorieService extends Service implements SensorEventListener { |
| 163 | 159 | } |
| 164 | 160 | }).start(); |
| 165 | 161 | startTimeCount(); |
| 166 | - } else { | |
| 167 | - EventBus.getDefault().post(new MessageEvent(Constant.START_TRACE_GATHER_FAIL, "")); | |
| 168 | 162 | } |
| 169 | - | |
| 170 | 163 | flags = START_STICKY; |
| 171 | 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 | 161 | //隐藏空视图 |
| 162 | 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 | 166 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { |
| 167 | 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 | 144 | //显示立即报名按钮 |
| 145 | 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 | 148 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { |
| 149 | 149 | @Override |
| 150 | 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 | 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 | 223 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); |
| 224 | 224 | layoutParams.setMargins(ScreenUtil.dip2px(getContext(), 15), 0, ScreenUtil.dip2px(getContext(), 15), 0); |
| 225 | 225 | fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); |
| ... | ... | @@ -375,7 +375,6 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { |
| 375 | 375 | // }); |
| 376 | 376 | //显示底部滑动卡片 |
| 377 | 377 | fragment.binding.slidingLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); |
| 378 | - fragment.binding.scrollView.scrollTo(0, 0); | |
| 379 | 378 | if (!TextUtils.isEmpty(runRaceDetailInfo.getE_subtitle())) { |
| 380 | 379 | fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 210)); |
| 381 | 380 | } else { | ... | ... |