luckybilly / luckybilly/SmartSwipe

状态栏不能随着手势移动

Open
#75 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

### 问题描述

通过mActivity.getWindow().setStatusBarColor设置的状态栏不能随着手势移动

- 预期行为:
状态栏可以随着手势移动

- 实际行为:
状态栏在滑动的时候没变

### 出问题的代码

```java
fun getSliderConsumer(activity: Activity) = ActivitySlidingBackConsumer(activity)
.setRelativeMoveFactor(0.5f)
.setScrimColor(Color.TRANSPARENT)
.setShadowColor(-0x80000000)
.setShadowSize(Box.dp2px(10))
.setEdgeSize(Box.dp2px(20))
.enableDirection(SwipeConsumer.DIRECTION_HORIZONTAL)
.addListener(object : SimpleSwipeListener() {
override fun onSwipeOpened(wrapper: SmartSwipeWrapper, consumer: SwipeConsumer, direction: Int) {
activity.finish()
activity.overridePendingTransition(com.billy.android.swipe.R.anim.anim_none, com.billy.android.swipe.R.anim.anim_none)
}
})

```

### 当前使用的SmartSwipe版本号:
例如: **1.1.2**

### 如何复现?(如果能在demo中复现将有利于作者尽快修复问题)

### 截图或gif
![image](https://user-images.githubusercontent.com/13192613/85944335-8954e100-b968-11ea-8ef2-e69284dfcdda.png)
![image](https://user-images.githubusercontent.com/13192613/85944345-a689af80-b968-11ea-9450-4283494cf0ec.png)

图2的左边页面状态栏露出部分应该是白色

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the getSliderConsumer entry point and ActivitySlidingBackConsumer configuration shown in the report. Trace how the swipe position is applied to the activity window and how setStatusBarColor is handled. Done means the status bar color moves with the gesture and the exposed portion matches the expected white appearance; reproduce using the provided setup and screenshots.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.