Android Question Loading layout file into compiled library

Hi,

I have a library witch contains an activity and a class module. For the activity, it was created a layout.
Now when using the library for testing it, the layout doesn't layout doesn't seams to be loaded.
The layout file is in the Files folder of my testing project.
How can I solve this?
Thanks in advance
 
Invoking LoadLayout in the activity should load the layout from DirAssets. If it is not then we need more information about how you are making the library and preferably a small sample project and library.
Hi,
thank you for replying.
It looks like the layout wasn't in the "Files" folder in the loading project.
Now it appears, but it has other problems.
To test the library, I put a Label in the layout. The goal is to make the library Activity behave like a dialog box. For this, the manifest was edited
for the Activity to be transparent.
The activity loads a panel that contains a label outside the designer. The panel is smaller than the activity and has a gray color.
In the library usage test, there is another activity with a blue background.
When the library is called, the gray panel should appear on a blue background. But that doesn't happen.
It appears over white background. Does the designer add a panel to build the layout ? Is that panel that i see ? How can i reach it?
What am I doing wrong?
I attach the test zips.
Thanks in advance
 

Attachments

  • FileDeck.zip
    11.2 KB · Views: 86
  • FileDeckDemo.zip
    10.2 KB · Views: 94
Upvote 0
Create a b4xlib. You can include assets files inside the library.
Hi and thanks for the help.
While I've already managed to get the layout to show up in the library test by loading the jar, I haven't stopped trying to create
to b4xlib, as you suggested.
I don't know what I did wrong, but in the IDE the one I created appears in the list of libs, but with an indication of version 0.00. When creating the object for this library, it is not recognized.
To create b4xlib, isn't it enough to change the export from .zip to .b4xlib?
I attach the b4xlib that was created.
Thanks in advance
1623298430499.png
 

Attachments

  • FileDeck.b4xlib
    11.2 KB · Views: 90
Upvote 0
Top