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 変数の値が true ではなく false である理由がわかりません

4

1 に答える 1

3

を使用してブール値を設定するBundle#putBoolean(String,boolean)と、次のようになります。

b.getBoolean("timerlogic", timerStart);

次のようにする必要があります。

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