Skip to content

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

Closed

Description

@lejun

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

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

Activity

  1. lejun commented on Sep 21, 2014

    @lejun
    Author

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

  2. ikew0ng commented on Sep 21, 2014

    @ikew0ng
    Owner

    试试最新的代码 我调整了一些东西
    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.

  3. lejun commented on Sep 21, 2014

    @lejun
    Author

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

  4. ikew0ng commented on Sep 21, 2014

    @ikew0ng
    Owner

    那 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)
    .

  5. lejun commented on Sep 21, 2014

    @lejun
    Author

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

  6. ikew0ng commented on Sep 21, 2014

    @ikew0ng
    Owner

    我觉得是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)
    .

  7. lejun commented on Sep 22, 2014

    @lejun
    Author

    我运行的是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

  8. ikew0ng commented on Sep 22, 2014

    @ikew0ng
    Owner

    先显示应用界面是指桌面吗?
    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)
    .

  9. lejun commented on Sep 22, 2014

    @lejun
    Author

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

  10. ikew0ng commented on Sep 22, 2014

    @ikew0ng
    Owner

    最顶层的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)
    .

  11. lejun commented on Sep 22, 2014

    @lejun
    Author

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

  12. changed the title [-]android 4.4.4侧滑退出效果与4.4.2不同问题[/-] [+]android 4.4.4侧滑退出显示app启动界面[/+] on Sep 22, 2014
  13. ikew0ng commented on Sep 22, 2014

    @ikew0ng
    Owner

    嗯 小意思
    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)
    .

  14. MrFuFuFu commented on Oct 30, 2014

    @MrFuFuFu

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

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

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

  15. lejun commented on Oct 30, 2014

    @lejun
    Author

    设置最低层的Activity的style为:

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

    其它的activity则设置为:

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

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

  16. MrFuFuFu commented on Oct 31, 2014

    @MrFuFuFu

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

  17. fulianzhi commented on Feb 4, 2015

    @fulianzhi

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions