2012-05-11 5 views
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 переменная имеет значение ложь, а не правдаБулева переменная не передается getBoolean переменной

ответ

3

Вы можете установить логическое значение, используя Bundle#putBoolean(String,boolean), так это:

b.getBoolean("timerlogic", timerStart); 

Должно быть:

b.putBoolean("timerlogic", timerStart); 
+0

спасибо Я понимаю свою ошибку – al23dev

Смежные вопросы