V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
CBBing
V2EX  ›  问与答

Android 中怎么从 Activity 跳转到 Fragment 界面

  •  
  •   CBBing · 2015-07-18 16:41:04 +08:00 · 3643 次点击
    这是一个创建于 3221 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Android中从Fragment到Activity后想通过点击Activity里的Button回到Fragment界面,怎么实现

    android开发新入坑,求教
    5 条回复    2015-07-18 21:19:33 +08:00
    likaci
        1
    likaci  
       2015-07-18 16:51:22 +08:00   ❤️ 1
    Activity.this.finish()
    xjl
        2
    xjl  
       2015-07-18 17:06:15 +08:00
    一般来说, 现在都是一个MainActivity了, 其他都用Fragment。
    CBBing
        3
    CBBing  
    OP
       2015-07-18 17:07:38 +08:00
    @likaci 多谢
    CBBing
        4
    CBBing  
    OP
       2015-07-18 17:08:49 +08:00
    @xjl 新人刚入坑,,,
    wohenyingyu01
        5
    wohenyingyu01  
       2015-07-18 21:19:33 +08:00
    fragment是activity的一部分,没有单独存在,何来跳转之说。。。。。。。。。。。。。。。。。。。。。。。。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3146 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 14:11 · PVG 22:11 · LAX 07:11 · JFK 10:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.