2012-05-11 2 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); 

변수 getBoolean에 전달하므로이되지 않는 :부울 변수는 timermagics 변수가

b.getBoolean("timerlogic", timerStart); 

해야한다 :

b.putBoolean("timerlogic", timerStart); 

답변

3

당신은 Bundle#putBoolean(String,boolean)를 사용하여 부울을 설정 허위 사실이 아니다의 값을 갖는 이유는 확실하지 않다
+0

내 실수를 이해해 주셔서 감사합니다. – al23dev

관련 문제