V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Ibb
V2EX  ›  Android

有两个活动,firstactivity 上使用隐式 Intent 呼唤 secondactivity

  •  
  •   Ibb · 2017-07-21 18:54:40 +08:00 · 4037 次点击
    这是一个创建于 2469 天前的主题,其中的信息可能已经有所发展或是发生改变。

    有两个活动,firstactivity 上使用隐式 Intent 呼唤 secondactivity

    同时使用 Intent 传送字符串过去 然后再 secondactivity 上调用 Log.d("secondactivity", data);

    可是为什么在 secondactivity 上的 Oncreate 里无法使用这个方法却可以在 button2.onclick 里使用?

    怎么没法传图片..

    1 条回复    2017-07-21 23:35:11 +08:00
    zjp
        1
    zjp  
       2017-07-21 23:35:11 +08:00 via Android
    button2 用来启动 secondactivity,而 secondactivity 的启动模式是 singleTask 对吧,改成 singleTop。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1017 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:01 · PVG 06:01 · LAX 15:01 · JFK 18:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.