sequence of events in Activity_Create

yonson

Active Member
Licensed User
Longtime User
Hi everyone,

I'm having a problem with the bits of code being called in Activity_Create before others. I won't post the full code here but put in an example, basically the sequence is :-

  • Set the Background Image
  • Show a MessageBox
  • Load the Database


Here is the code:-

Sub Activity_Create(FirstTime As Boolean)
Activity.SetBackgroundImage(LoadBitmap(File.DirAssets, "bg.png"))
ProgressDialogShow("Loading Database - please wait")

SQL.Initialize(File.DirInternal,dbName,True)
loadDatabase(dbName) 'my own internal function
ProgressDialogHide
End Sub

this code works fine, however the problem is that the background image is never set, and the progressdialogshow is never shown until the database has been loaded in. As a result its just a blank page for the first 30 seconds or so of the app.

Can anyone tell me how I can force the ordering please? Many thanks!
 

yonson

Active Member
Licensed User
Longtime User
thanks Erel much appreciated.

When the app starts up for the first time it creates the database from a file or via an update, so after the first start up its nice and quick, its just the first time I want to make sure the user knows the app is doing something and hasn't just crashed.

Thanks for your help!
 
Upvote 0
Top