ANDROID LIFECYCLE REWORK: DISABLING GLView REUSE AFTER DETACHMENT WHEN destroyOnDetach IS TRUE. ALSO: TESTING HOW THE SYSTEM WORKS A GLView IS ATTACHED/DETACHED + HIDDEN/SHOWN CONSECUTIVELY (EVEN-THOUGH WE’RE NOT SUPPOSED TO HANDLE SUCH A CASE…)
ANDROID LIFECYCLE REWORK: CONFIRMING THAT mDestroyOnDetach SHOULD BE KEPT TO TRUE (I.E. THE DEFAULT BEHAVIOR). OTHERWISE, IT CAN CAUSE TO PROBLEMS WHEN USING THREAD-SENSITIVE CODE IN THE GLRenderer (AS WE DO IN OUR CinderRender: I.E. HOOKING A Looper TO THE RENDERER’S THREAD FOR HANDLING THE ACCELEROMETER, ETC.)
HOW TO REPRODUCE PROBLEM WITH samples/GrapeFrukt (GLView IS NOT ATTACHED AT CREATION TIME):
1) ATTACH
2) DETACH
3) ATTACH
4) HIDE
5) BACK BUTTON
SOMETIMES: THE APPLICATION EXITS (HOWEVER THE CinderDelegate IS NOT DELETED AS INTENDED), AND THE APP IS “HANGED” WHEN RE-ENTERED...
ANDROID LIFECYCLE REWORK: BRINGING BACK samples/GrapeFrukt TO “DEFAULT BEHAVIOR”. WORKED ALL-DAY-LONG ON NEXUS 7. NOW, WHEN BACK TO XOOM 1: NOT EVERYTHING IS WORKING AS INTENDED ;)
1) WHEN STARTING IN PORTRAIT: SOMETIMES (WHEN THE APP WAS PREVIOUSLY DESTROYED BUT STILL “IN MEMORY”?): DISPLAY IS DEFORMED AT STARTUP!!!
2) SOMETIMES, WHEN PRESSING THE “BACK BUTTON”, THE APP IS NOT PROPERLY SHUT-DOWN (BECAUSE CONTEXT IS NOT DESTROYED…)