Ibb
V2EX  ›  Android

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

  •  
  •   Ibb · Jul 21, 2017 · 11991 views
    This topic created in 3219 days ago, the information mentioned may be changed or developed.

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

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

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

    怎么没法传图片..

    1 replies    2017-07-21 23:35:11 +08:00
    zjp
        1
    zjp  
       Jul 21, 2017 via Android
    button2 用来启动 secondactivity,而 secondactivity 的启动模式是 singleTask 对吧,改成 singleTop。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4256 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 10:11 · PVG 18:11 · LAX 03:11 · JFK 06:11
    ♥ Do have faith in what you're doing.