Activity1 is a "Welcome" screen. Touch anywhere on Activity 1 will start Acivity2. Activity2 consists of 8 "Menu" bitmaps, so user touches one the bitmaps which will start its corresponding Activity. I "finish" activity2 whenever leaving it, to release the memory consumed by the bitmaps. All of the other activities in the project (except Activity1) have a "back" button which returns user to Activity2. Activity2 has a "back" button which returns to Activity1. Pretty basic stuff here, everything works fine as intended, with one exception.
This code works fine to go from Activty2 to Activity1
Sub btn_back
activity.start(activity1)
end sub
If the user then again touches Activity1 to go back to Activity2, all is well. However, with this code in Activity2:
Sub btn_back
activity.start(activity1)
activity.finish
end sub
If the user then again touches Activity1, Activity1 goes away and I get the home screen of the tablet -- kind of like the whole app disappears. If I wait about 10 seconds after coming back to Activity1 and then touch, Activity2 loads as intended. This behavior does not occur when transitioning between Activity2 and any of the other Activities -- only Activity1. As mentioned before, I have activity.finish in the code that goes from Activity 2 to any other activity, and no problems -- only when going back to Activity1.
One more detail. On Activity1, there is a timer that is used to create a scrolling block of text, like credits at the end of a movie. I find that if I disable that timer, this issue I have described above does not occur -- I can go back and forth from 1 to 2 and back again with no delays, and everything works fine. As soon as I re-enable that timer on Activity1, the problem comes back. I am stumped!!!
This code works fine to go from Activty2 to Activity1
Sub btn_back
activity.start(activity1)
end sub
If the user then again touches Activity1 to go back to Activity2, all is well. However, with this code in Activity2:
Sub btn_back
activity.start(activity1)
activity.finish
end sub
If the user then again touches Activity1, Activity1 goes away and I get the home screen of the tablet -- kind of like the whole app disappears. If I wait about 10 seconds after coming back to Activity1 and then touch, Activity2 loads as intended. This behavior does not occur when transitioning between Activity2 and any of the other Activities -- only Activity1. As mentioned before, I have activity.finish in the code that goes from Activity 2 to any other activity, and no problems -- only when going back to Activity1.
One more detail. On Activity1, there is a timer that is used to create a scrolling block of text, like credits at the end of a movie. I find that if I disable that timer, this issue I have described above does not occur -- I can go back and forth from 1 to 2 and back again with no delays, and everything works fine. As soon as I re-enable that timer on Activity1, the problem comes back. I am stumped!!!