Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

状态栏不能随着手势移动 #75

Open
BetterIgor opened this issue Jun 28, 2020 · 2 comments
Open

状态栏不能随着手势移动 #75

BetterIgor opened this issue Jun 28, 2020 · 2 comments

Comments

@BetterIgor
Copy link

BetterIgor commented Jun 28, 2020

问题描述

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

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

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

出问题的代码

    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
image

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

@qinhongfei
Copy link

mActivity.getWindow().setStatusBarColor 设置状态栏颜色是对系统状态栏背景设置颜色,想要滑动状态栏一起滑动返回,需要设置全屏然后设置状态栏透明然后设置顶部状态栏高度的一个距离高度,然后对这个距离高度设置一个颜色,他的这个框架应该没有处理这块,具体你可以参考这个框架里的做法:https://github.com/JustRight815/SwipeBackLayoutTouTiao

1 similar comment
@qinhongfei
Copy link

mActivity.getWindow().setStatusBarColor 设置状态栏颜色是对系统状态栏背景设置颜色,想要滑动状态栏一起滑动返回,需要设置全屏然后设置状态栏透明然后设置顶部状态栏高度的一个距离高度,然后对这个距离高度设置一个颜色,他的这个框架应该没有处理这块,具体你可以参考这个框架里的做法:https://github.com/JustRight815/SwipeBackLayoutTouTiao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants