I'm somewhat lost as to why this is behaving this way.
To attempt to keep things simple, I'll just say I have 4 activities: "1" "2" "3" "4" and a layout for each (assume matching names). This may be a bit hard to follow.
Activity 1 loads layout 1, which has two buttons. One button logs the user in and starts activity 3. The other button starts activity 2 which lets the user sign up, and once signed up, starts activity 3 (essentially logging the user in automatically once the signup is successful).
Activity 3 then loads layout 3, which has a TabHost. Each tab has some different content (not important, working fine). One tab has a button that starts activity 4 (which loads layout 4). This layout has a spinner and an EditText for the user to choose an item and type some info. Then it has a Submit button. This submit button sends the info to my database and creates a record (working fine). A message box opens letting the user know that the info was received. The Job is released once the user hits OK, and I call Activity.Finish (there's no reason to do anything else on activity 4). I am correctly brought back to activity 3.
If I hit the back key, I'm correctly taken back to Activity 1 as I intend (login screen). If I hit the login button (which should start activity 3), it instead starts activity 4 (why is this happening? Not only did I kill activity 4, but this login button is explicitly programmed to start activity 3, not 4). Hitting back key again takes me back to the activity 1 login screen, but hitting login yet again starts activity 4.
I already tried removing the "Activity.Finish" from activity 4. This then requires the user to hit the back key after pressing OK on the message box confirming that their submission was received. I don't want this to be this way, but regardless it isn't solving the problem. The login button from Activity 1 is still starting Activity 4 for some reason. The log even shows such (it is starting activity 4 instead of 3). I'm not using any custom Sub for the back key; it is behaving is it does natively.
To attempt to keep things simple, I'll just say I have 4 activities: "1" "2" "3" "4" and a layout for each (assume matching names). This may be a bit hard to follow.
Activity 1 loads layout 1, which has two buttons. One button logs the user in and starts activity 3. The other button starts activity 2 which lets the user sign up, and once signed up, starts activity 3 (essentially logging the user in automatically once the signup is successful).
Activity 3 then loads layout 3, which has a TabHost. Each tab has some different content (not important, working fine). One tab has a button that starts activity 4 (which loads layout 4). This layout has a spinner and an EditText for the user to choose an item and type some info. Then it has a Submit button. This submit button sends the info to my database and creates a record (working fine). A message box opens letting the user know that the info was received. The Job is released once the user hits OK, and I call Activity.Finish (there's no reason to do anything else on activity 4). I am correctly brought back to activity 3.
If I hit the back key, I'm correctly taken back to Activity 1 as I intend (login screen). If I hit the login button (which should start activity 3), it instead starts activity 4 (why is this happening? Not only did I kill activity 4, but this login button is explicitly programmed to start activity 3, not 4). Hitting back key again takes me back to the activity 1 login screen, but hitting login yet again starts activity 4.
I already tried removing the "Activity.Finish" from activity 4. This then requires the user to hit the back key after pressing OK on the message box confirming that their submission was received. I don't want this to be this way, but regardless it isn't solving the problem. The login button from Activity 1 is still starting Activity 4 for some reason. The log even shows such (it is starting activity 4 instead of 3). I'm not using any custom Sub for the back key; it is behaving is it does natively.
Last edited: