Android Question B4XPages

Thanks. I have already managed to partially resolve this issue. Now the controls that I add to the form, like edittext, are not responding!
 
Upvote 0
Thanks. I have already managed to partially resolve this issue. Now the controls that I add to the form, like edittext, are not responding!
Fyi - in the Android world we call them Activities, Layouts ("forms") & Views ("controls"), or I guess if you're using B4XPages it would be Activities, Layouts & Views? I know it seems I'm being pedantic, but if you're posting in the forum looking for assistance it's easier if you use the same terminology as everyone else. :)

- Colin.
 
Upvote 0
Upvote 0
I read the booklet and cleared up some doubts, but I still can't create a layout for the additional pages, apart from the main one. I downloaded even the B4J to test faster. I create a new layout, saved with the same name as the page, but I can't get the controls (Views) to be recognized in the specific page module.
 
Upvote 0
Capturar.PNG
 
Upvote 0
I don't understand then. In my view, both the code module (B4XPage1) and the layout (B4XPage1.bjl) of page 1 are present in the project. I created the project in B4J, but both in B4J and B4A the module and layout appear, although in B4A it is a little more confusing!
 
Upvote 0
In the IDE of each product you need to add the xxx.bas file as an existing module with a relative link.
The layouts are different for each product, you cannot use a xxx.bjl file in the B4A program, but you can copy views from a B4J layout to a B4A layout.
As already suggested, you might read the B4XPages Cross-platform projects booklet, the above is explained on page 22.
 
Upvote 0
Sorry, Krauss, but the booklet doesn't explain how to add the layout to the project. It simply says it is simple to do, but it does not say how. I just wanted to understand how to call a page (layout) and have it displayed. In this example, page 1 should be displayed with the layout with an ImageView loaded with an image. A log is displayed 'Layout file' B4XPage1.bjl 'is not used'.
 
Upvote 0
By poking here and there in the project and looking at similar questions from other people, resolved or not, I managed to unravel the mystery. The page module, Root.LoadLayout, was missing to load it. In my case, Root.LoadLayout ("B4XPage1"), in Private Sub B4XPage_Created.
 
Upvote 0

Similar Threads

Replies
8
Views
17K
Replies
2
Views
13K
Replies
22
Views
42K
  • Locked
  • Article Article
Replies
4
Views
23K
Back
Top