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

android 4.4.4侧滑退出显示app启动界面 #45

Closed
lejun opened this issue Sep 21, 2014 · 16 comments
Closed

android 4.4.4侧滑退出显示app启动界面 #45

lejun opened this issue Sep 21, 2014 · 16 comments

Comments

@lejun
Copy link

lejun commented Sep 21, 2014

RT:
情况,我手机上两台手机:nexus5(4.4.4)与化为X6(4.4.2)退出滑动效果不一致。
两台手机都是运行同一套代码
1,nexus5 只有当activity完全退出时,前一个activity才出弹出
2,华为X6则可以完美展示(即在滑动退出时,就可以看见前一个activity)

(已经设置透明主题)
参考过这个问题:
#4

@lejun
Copy link
Author

lejun commented Sep 21, 2014

但是“知乎”在nexus5(4.4.4)上则是正常的(滑动退出过程中可以看见它的上一个页面)

@ikew0ng
Copy link
Owner

ikew0ng commented Sep 21, 2014

试试最新的代码 我调整了一些东西
2014年9月21日 下午4:35于 "lejun" notifications@github.com写道:

RT:
情况,我手机上两台手机:nexus5(4.4.4)与化为X6(4.4.2)退出滑动效果不一致。
两台手机都是运行同一套代码
1,nexus5 只有当activity完全退出时,前一个activity才出弹出
2,华为X6则可以完美展示(即在滑动退出时,就可以看见前一个activity)

(已经设置透明主题)
参考过这个问题:
#4 #4


Reply to this email directly or view it on GitHub
#45.

@lejun
Copy link
Author

lejun commented Sep 21, 2014

不好意思,我这里看到最新的提交是“Commits on Sep 13, 2014”
(我也再次Download zip 进行一次运行)
在nexus5效果还是那样的

@ikew0ng
Copy link
Owner

ikew0ng commented Sep 21, 2014

那 demo 运行正常吗?
2014年9月21日 下午5:53于 "lejun" notifications@github.com写道:

不好意思,我这里看到最新的提交是“Commits on Sep 13, 2014”
(我也再次Download zip 进行一次运行)
在nexus5效果还是那样的


Reply to this email directly or view it on GitHub
#45 (comment)
.

@lejun
Copy link
Author

lejun commented Sep 21, 2014

demo运行是正常的,只当多次点击 start new activity 打开多个页面时,每次侧滑回至上一个页面会先显示应用界面,然后再弹出上一个页面。

@ikew0ng
Copy link
Owner

ikew0ng commented Sep 21, 2014

我觉得是theme没设对呢。。
2014年9月21日 下午7:09于 "lejun" notifications@github.com写道:

demo运行是正常的,只当多次点击 start new activity
打开多个页面时,每次侧滑回至上一个页面会先显示应用界面,然后再弹出上一个页面。


Reply to this email directly or view it on GitHub
#45 (comment)
.

@lejun
Copy link
Author

lejun commented Sep 22, 2014

我运行的是demo Image,关于demo的theme这一块没有做改变

目前这一个问题只量出现在“LG”的手机(Nexus5与G2)上(4.4.4、4.4.2)

图片没有上传成功,我在百度网盘上有运行效果链接(只是nexus5的):
GIf:
http://pan.baidu.com/s/1jGwuZiA
Mp4:
http://pan.baidu.com/s/1kTsplGz

@ikew0ng
Copy link
Owner

ikew0ng commented Sep 22, 2014

先显示应用界面是指桌面吗?
2014年9月21日 下午7:09于 "lejun" notifications@github.com写道:

demo运行是正常的,只当多次点击 start new activity
打开多个页面时,每次侧滑回至上一个页面会先显示应用界面,然后再弹出上一个页面。


Reply to this email directly or view it on GitHub
#45 (comment)
.

@lejun
Copy link
Author

lejun commented Sep 22, 2014

那一个界面启动的就显示那一个界面
(APP列表界面、后台运行界面 nuexus5最右侧虚拟按键进入,然后选择 Image ,则每次滑动退出会先显示这个界面)

@lejun lejun closed this as completed Sep 22, 2014
@ikew0ng
Copy link
Owner

ikew0ng commented Sep 22, 2014

最顶层的activity设置成了透明就会这样 去掉顶层的透明再试试
2014年9月22日 上午11:15于 "lejun" notifications@github.com写道:

那一个界面启动的就显示那一个界面
(APP列表界面、后台运行界面 nuexus5最右侧虚拟按键进入,然后选择 [image: Image]
https://raw.githubusercontent.com/Issacw0ng/SwipeBackLayout/master/samples/src/main/res/drawable-xhdpi/ic_launcher.png
,则每次滑动退出会先显示这个界面)


Reply to this email directly or view it on GitHub
#45 (comment)
.

@lejun
Copy link
Author

lejun commented Sep 22, 2014

参考:#38
应该是最顶层设置为windowIsTranslucent 为 true; 而被覆盖的windowIsTranslucent 设置为 false。
“setting windowIsTranslucent to false for bottom activity seems to work.”
3Q,打扰了这么长时间。

@lejun lejun changed the title android 4.4.4侧滑退出效果与4.4.2不同问题 android 4.4.4侧滑退出显示app启动界面 Sep 22, 2014
@ikew0ng
Copy link
Owner

ikew0ng commented Sep 22, 2014

嗯 小意思
2014年9月22日 下午9:09于 "lejun" notifications@github.com写道:

参考:#38 #38
应该是最顶层设置为windowIsTranslucent 为 true; 而被覆盖的windowIsTranslucent 设置为 false。
“setting windowIsTranslucent to false for bottom activity seems to work.”
3Q,打扰了这么长时间。


Reply to this email directly or view it on GitHub
#45 (comment)
.

@MrFuFuFu
Copy link

不好意思,我也碰到了同样的问题,在Android 4.4.4 (Nexus 4) 上面也碰到了同样的问题,但是在 Android 4.1 (Nesxus S) 的手机上没有问题。即,滑动关闭 Activity 的时候 滑动过程中显示的不是上一个 Activity 而是 Home 界面。看了你们的问答。发现没有看懂...

“setting windowIsTranslucent to false for bottom activity seems to work.”

这句话如何理解?
或者是我需要如何修改才能使效果完善?谢谢

@lejun
Copy link
Author

lejun commented Oct 30, 2014

设置最低层的Activity的style为:

  <item name="android:windowIsTranslucent">false</item>

其它的activity则设置为:

<item name="android:windowIsTranslucent">true</item>

我是这样解决的。。。
好运!

@MrFuFuFu
Copy link

@lejun 非常感谢你,这个问题解决了。同时也希望作者能够完善一下。

@fulianzhi
Copy link

我也碰到了同样的问题。。。
我的是Android 4.4.4(MX2), 我只有一个activity, 一滑动就直接看到桌面了

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

4 participants