0
Intent i = new Intent(AndroidGUIActivity.this, Basic_database_questionsActivity.class);
Bundle b = new Bundle();
// get the current value of timerStart variable and store it in timerlogic
Log.e(LOGS, "Whatis the value of timerstart inside the intentcalls method" +  timerStart);
b.getBoolean("timerlogic", timerStart);
boolean timermagic= b.getBoolean("timerlogic");
Log.e(LOGS, "Whatis the value of timerstart passed to timermagic" + timermagic);

我不确定为什么 timermagics 变量的值为 false 而不是 true

4

1 回答 1

3

您使用 设置布尔值Bundle#putBoolean(String,boolean),因此:

b.getBoolean("timerlogic", timerStart);

应该:

b.putBoolean("timerlogic", timerStart);
于 2012-05-11T21:09:26.827 回答