Buttons and Images Disappearing after Splash Screen / Arrangement Visibility Change

Digging up an older post here.

I have an fairly well established app (getting there) and I'd like to introduce a splash screen using the above method which makes complete sense in simple terms.

My issue is this:

My main interface is held in a vertical arrangement. I make this not visible by default and the splash screen visible by default. Once an image has loaded within the hidden vertical arrangement (actually, a horizontal arrangement within the vertical arrangement), I make the splash screen canvas not visible and make the main vertical arrangement visible.

Problem is - not all of the elements held within the main vertical arrangement re-appear. The most noticeable omission are all the buttons. None are appearing. And similarly, the code I use to close the splash screen canvas is a display image routine - it works to make the splash screen canvas not visible, and make the main screen arrangement visible, but the subsequent image is not displayed.

There is a switch element and text in the hidden arrangement that becomes visible, but these appear as expected. The switch operates and executes the appropriate code.

These are the primary blocks:

blocks (21)

I also have a screen setup routine which sets the screen up as follows:

My initial thoughts are:

If the main screen vertical arrangement is not visible, does that have some kind of impact on the way the screen setup routine works? Particularly to do with the buttons which do not reappear?

Perhaps the ImageViewer extension needs the element it uses to hold the images to be visible as part of its operation? This is that extension:

I can't see an "after image loaded event"

The image loads via the DisplayImage routine using the ImageViewer1.path command. The lines of code just prior to this is where I switch the splash canvas off and the main screen arrangement on.

Have you tested if the imageViewer extension can load images on a non visible arrangement ?

Not yet, but I have asked @ZainUlHassan via kodular about this specifically.

It would not seem to explain the buttons not appearing. Although i note that all of the buttons are png images.

My guess is that that some of your setup procedures in screen1.initialise are not able to perform successfully while your main vertical arrangement (VA) is not visible. Try moving them to after you make the VA visible.....

The splash screen is nice, but it's primary goal was to try and hide the progressive setup of the main screen.

A lot of the main screen text and images all rely on data received from Web.get routines, so they don't load so quickly.

I understand that, but try as suggested and see if that resolves your problem. At least then you will know what the issue is. You may be able to do something by having your VA visible and load it below (not behind) the canvas (out of sight but visible), then when you hide the canvas your VA moves into position ?

I'm having real trouble with these arrangements. My screen is essentially made up of three vertical arrangements:

  1. SplashScreen_Arranagement - Splashscreen
  2. MainScreen_Arranagement - The main app screen; and
  3. VA - A vertical arrangement that ColinTreeListView Uses.

My screen size is set to fixed, unfortunately, due to some poor scaling renditions of the images I load in the app.

I set the SplashScreen_Arranagement to Fill Parent for both height and width:


I set the MainScreen_Arrangement to Automatic Height and Fill Parent Width:


However, this is how the arrangement appears (phone snapshot taken before the main image had loaded, when the SplashScreen_Arranagment should be filling the screen.

You can see how the SplashScreen_Arranagement only appears as a small band along the top of the screen.

Any ideas? I had previously used the Canvas method instead of the arrangement method for the splash screen, but the canvas refused to become not visible through code!

Is it perhaps because the MainScreen_Arranagement is aligned to bottom? I tried changing this to Top, but it made little difference. The SplashScreen_Arranagement band becomes marginally higher, presumably due to the difference in the overall height of the MainScreen_Arranagement and the physical screen height:

Here is a basic aia project with 3 VAs all set to fill parent

ThreeVA.aia (1.1 KB)

I recommend you play around with this so that you get an understanding of how things can work for you. Note the screen scrollable checkbox is unticked!

  1. Change the visibility of one or more VAs and see what happens
  2. Fix the height of one or more VA and see what happens, also with 1. above
  3. Place some fixed size components in one or more of the VAs and do 1. and 2. and see what happens
  4. carry out any other tests you need to try
  5. Set it up as you want for your app, if this works then apply those settings to your app

Thanks @TIMAI2. I just tried setting the MainScreen_Arrangement to 0 pixels by default and then calling:

To set it back to "Automatic" and it works.

Setting the height to 0 pixels seems to keep it "visible" although you can't see it, and therefore i'm also not getting any issues with the buttons disappaearing or the image not loading.

Well done :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.