layout show firsttime

ringmyr

Member
Licensed User
Longtime User
hi
i want the first time a user run my open a spec layout show only the first time he start my app.

i think is somthing about

B4X:
Sub Activity_Create(FirstTime As Boolean)
if firstime the

'the code here to load the layout

else

show the second layout

end if
sub end

on the right track?

/ringmyr
 

lagore

Active Member
Licensed User
Longtime User
Hi,
I am not sure if you mean you only want the user to see the 'special first time layout' only ever once or only on app startup.
For only ever once you would have to use an indicator which the first time the app is run would indicate it is the very first launch this could be used to load the 'special layout' then change the indicator and save it then next time the app is launched the the 'normal layout' can be launched.
The
B4X:
If FirstTime Then
      'load the startup layout
   End If
this will be true the very first time the app is run but also everytime the app runs after the OS has 'killed' it or if we force it killed, read the life cycle of an android app on this forum for a fuller explaination.
Edward
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…