Two Activities issue....

raytronixsystems

Active Member
Licensed User
Longtime User
Hello:

I have a problem that I'm not sure how to handle. I won't post any code but give you a conceptual view of the program structure and what is happening.


I hame two components Main and Activity 2. Main simply consists of a black screen with a button. The screen was created with the Designer. In Main.Activity_Create a LoadLayout call is made to display a layout file created by the Designer. When the button is pressed in Main it calls GoSubDelayed2 to launch a subroutine in Activity 2. The subroutine in Activity 2 comes up, loads its layout with a white background. Any button pressed in Activity2 calls GosubDelayed3 to invoke a subroutine in Module Main. The subroutine in Module Main that is invoked in turn loads another layout file3 with a white background.

My problem is as follows. Main will launch Activity2 with no problems. When the BACK key is pressed in Activity2, layout file3 in Main is displayed when the subroutine is invoked. This happens immediately and all looks OK. However, if I press any button in Activity2, instead of immediately launching Main and calls the subroutine to loadi the Layout it instead briefly displays the black-colored Panel initially invoked by the Main Activity_Create asubroutine and then goes forth and invokes the subroutine which launches the white-colored Panel loaded by the subroutine called by Activity2. This is very annoying and has forced might prevent me from using 2 Activities if I cannot fix this "flashing" problem.

I'm thinking that Activity_Create is being invoked somehow by the second Activity when it does it's call to the Main Activity Subroutine. I'm
not sure what the answer is. I'm trying to set the visible property on the Main layout file to False but not sure how you would accomplish this for layouts created by the designer.

The code is quite lengthy and part of a larger project here . I cannot trim it down to show you what I have without revealing code that is soon going to the Market once I fix this problem.

Aby help/suggestions would be appreciated.
Thanks In Advance,
Ray
 
Top