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

在使用Material Design的Activity过度动画的时候,按back按钮出现黑屏 #101

Open
liuling07 opened this issue Dec 26, 2015 · 2 comments

Comments

@liuling07
Copy link

View transitionView = view.findViewById(R.id.ivNews);
            ActivityOptionsCompat options =
                    ActivityOptionsCompat.makeSceneTransitionAnimation(getActivity(),
                            transitionView, getString(R.string.transition_news_img));

            ActivityCompat.startActivity(getActivity(), intent, options.toBundle());

使用上述代码打开一个activity,然后按back按钮返回时出现黑屏,滑动返回时没有黑屏。

@zhangmx0320
Copy link

同样的问题,解决了吗

@OriginalLove
Copy link

我也遇到这个问题了,然后我修改源码SwipeBackActivityHelper 中的方法onActivityCreate()里面的 mActivity.getWindow().getDecorView().setBackgroundDrawable(null);改为 mActivity.getWindow().getDecorView().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); 就解决这个冲突了。

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

3 participants