Android Question Share Resources/Images

iCAB

Well-Known Member
Licensed User
Longtime User
Hi There,

I would like if someone can clarify the following for me.
In all B4A samples that I downloaded, there is always the following folders under "res":
drawable, layout & xml, that are almost never used.

The designer creates the layout file in the "Files" folder and so far mainly any images etc.. that I see being used are usually located in the "Files" folder.

I would to know, what is the proper way of doing this?, should images and other files be located in the "Res\drawable" folder or in the Files folder.
What about layout files?, are they supposed to be in "Res\Layout" ( and if so how to point to these files from inside the code ) or in "Files"?

Also how to hide these files from the end user. if I use a file manager and browse to the app folder, I do see all these files, which means that the end user can tamper with the app.


The other related question that I have is this:
if I am building multiple application that share the same images, layout files and other static files that the app needs to build the GUI, where should I store them so I don't have to create multiple copies one for each app.

Your help would be greatly appreciated.
 

DonManfred

Expert
Licensed User
Longtime User
What about layout files?, are they supposed to be in "Res\Layout"
Yes. But only if you are using XML layout files.
But you are probably not using XML.
Instead you are using bal files (which are supposed to be in files folder; this cant be changed i believe)

if I am building multiple application that share the same images, layout files and other static files that the app needs to build the GUI, where should I store them so I don't have to create multiple copies one for each app.
you need to store them on file.dirrootexternal for example so that all apps can access them.

Files in the files folder cannot be shared with another app.

Also note that bal files cannot be shared with other apps cause they must be exists in the files folder
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
Thanks for the clarification, however may be I wasn't clear when I said:

if I am building multiple application that share the same images, layout files and other static files that the app needs to build the GUI, where should I store them so I don't have to create multiple copies one for each app.

What I meant in here is: share during compile time ( I want to have all images and files in one folder that I reference in my projects during compile time )

Thanks again
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
Thanks that will do as well, but I was hoping for something similar to sharing code modules
 
Upvote 0
Top