Android Question cant load image from sub folder in assetsdir

ShadTech

Member
Licensed User
cant load image from sub folder in assetsdir
and the folder is there when i checked it
it rises error
any help
<<
img:
img.Bitmap = xui.LoadBitmapResize(File.DirAssets,"Modern/Modern/Commercial/Hall/Hall Meating/fefa34a6a15f0644d07d80de030a5907.jpg", p.Width / 2, p.Height+200, True)
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
Don't mix up directories and filenames. A filename is only a filename. A directory name included all sub directories.
Directory name include sub directories:
    Dim DirStr As String = $"${File.DirDefaultExternal}/Modern/Modern/Commercial/Hall/Hall Meating"$
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
can i load image from file manager using AssetDir or there is another way???
You must load files from File.DirAssets.


However, even if you create some groups as I showed you in my previous post, the files will still be in the only directory on PC: B4A/Files/. Let's say that groups can be considered virtual directories.

Note that those files can only be used for reading; so, for example, if you were to put a SQLite DB file in it, you could not work on that file directly, you would have to copy it (usually to the File.DirInternal) and work on that copy.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…