demo workaround

DavidLen

Member
Licensed User
Longtime User
I'm using the beta 2.3, and trying to get my head around the new environment.

Trying to use the first walk through app using a screen layout, I get bug produced error when I try to load a layout: Activity.LoadLayout("main") saying layout not found.

I know that I this is bug related, and I'm sure the fix is in the works.

How do I work around this issue?

I'd like to be able to follow the learning sequence without getting rid of the beta install.

David L.
 

DavidLen

Member
Licensed User
Longtime User
There is a bug in v2.30 with loading layouts to ScrollViews which do not have a known size. The issue you describe is not related to this bug.

Be that as it may, what is wrong with:

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("main")
End Sub

David L.
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Be that as it may, what is wrong with:

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("main")
End Sub

David L.

Nothing - assuming that you have a layout and it is called main. Why not upload a small project that shows this behaviour then we can all look at it.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Difficult to help you because I unziped your project and it works OK for me with B4A version 2.3 and previous versions 2.26 and 2.25.
The only 'problem' is you have two layout variants in the layout file and depending on the screensize of the device the wrong one could be loaded. The different views are setup correctly only in variant 600 x 960 x 1. But anyway the layout is loaded.

From the layout I saw that you are writing the FirstProgram from the Beginner's Guide.
You find the source code of this program in the SourceCode folder you got with the Beginner's Guide. So you could compare.

Best regards.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Attached is a corrected project. I removed one of the layouts and cleaned the other. I slighted modified your logic. This should work for you now.
 

Attachments

  • TestDavidLen.zip
    7.5 KB · Views: 251
Upvote 0
Top