Android Question [B4X] [B4XPages] - Splash Screen (animated gif mod)

luke2012

Well-Known Member
Licensed User
Longtime User
Hi all,
within a [B4X] [B4XPages] App I'm running the B4XPages Splash Screen (https://www.b4x.com/android/forum/threads/b4x-b4xpages-splash-screen.120851) by @Erel.

Before start coding, I have a couple of ("briefing") questions:

1) I wish to make a mod to it in order to display an animated gif instead the static image. Which is the suggested library to integrate within the B4XPages Splash Screen?
2) There are any specific / special code changes (in order to run an animated gif as cross platform solution) that I have to do to the original B4XPages - Splash Screen?

I think that this mod can be useful for many other B4XPages developers.

Thanks in advance for your suggestions :)
Luca.
 

Attachments

  • Schermata 2021-01-08 alle 09.16.09.png
    Schermata 2021-01-08 alle 09.16.09.png
    241.9 KB · Views: 707

luke2012

Well-Known Member
Licensed User
Longtime User
It is very easy to find any gif and convert it to apng. There are websites that do this. I did it that way.

Cool but the problem is that "B4XPages Splash Screen" implementation doesn't support the apng format, so I can't simply replace the x.png with the x.apng file within my "B4XPages Splash Screen" project. Right ?
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Try this (I don't have B4i - read the first post of the B4XGifView library about B4i)
I cannot attach the animated gif (too big file); take it from here (copy it to the Shared Folder and then click on the comment...)

Great Luca :)
I have B4i 6.80 so I can test it.

Within a cross platform B4XPages App where I should put the B4XGifView library ?
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
To the additional libraries folder. You should already have this structure, I think:
View attachment 105713

In the B4X folder

I'm using B4A 10.50 and within my B4XPages App I see this folder structure ...

Schermata 2021-01-08 alle 10.40.35.png


So I guess that I have to put the B4XGifView library within Shared Files.
But I'm little bit confusing about this because usually I put this libs within the Additional library folder but in this case I have to put it for each platform specific path ?
 
Last edited:
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I'm using B4A 10.50 and within my B4XPages App I see this folder structure ...
Yes, but don't put the library there, it has to be in the "Additional Folder":

1610099235806.png


(mouse right-click shows that dialog, click on "Open Additional..." and place B4XGifView.b4xlib and its additional files needed in the B4X folder you will find).
 
Last edited:
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Yes, but the library does not be placed there, must be in the "Additional Folder":

View attachment 105716

(mouse right-click shows that dialog, click on "Open Additional..." and place B4XGifView.b4xlib and its additional libraries needed in the B4X folder you will find).

Ok I try this.
Only a note: but in this way I have 3 copy of the library file (B4A, B4i and B4J). Or is it possible to define a single additional lib folder and point it within all the ides ?
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Only a note: but in this way I have 3 copy of the library file (B4A, B4i and B4J). Or is it possible to define a single additional lib folder and point it within all the ides ?
No, B4Xlibs are "special" libraries, you will have just one copy of B4XGifView.b4xlib in the B4X folder:

\AdditionalLibs\B4X

1610100024316.png

The above folders are in the AdditionalLibs folder.
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Thanks for the info.
I'm I little bit confused (about B4Xlib Libs right path).
Before read your last reply, I did a test and I create a single folder (for all ides) for AdditionalLibs and I point all the configuration paths (B4A, B4i and B4J) to that folder (...\B4X\ADD_LIBRARIES).

Opening your project within B4A it works with no errors (see on the left of the image). B4A has loaded the B4XGifView.b4xlib without \AdditionalLibs\B4X folder.
Opening the project within B4i it doesn't work (see errors and lib missing on the right).

Schermata 2021-01-08 alle 11.54.23.png


Note
Both AdditionalLibs folder path within B4A and B4i is set to "...\B4X\ADD_LIBRARIES".

Note2
But "No, B4Xlibs are "special" libraries, you will have just one copy of B4XGifView.b4xlib in the B4X folder" if this is true, why B4A is loading the B4XGifView.b4xlib ?
 
Last edited:
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
In italiano? Sorry.

Quando crei un progetto B4XPages vengono create 4 cartelle, una per ogni piattaforma (B4A, B4J, B4i), che contengono i file del tuo progetto (NomeProgetto.b4a nella cartella B4A, NomeProgetto.b4j nella B4J, ...) e SharedFiles, nella quale dovrai mettere tutti i file utilizzati dai progetti (*), come i file immagine, suoni, etc..

Le cartelle delle librerie non hanno niente a che fare con quelle 4 cartelle! Queste sono principalmente 2:
a - la cartella delle librerie interne (che si chiama Libraries), che si trova nella cartella di installazione della piattaforma, cioè dove hai installato B4A, dove hai installato B4J...
b - la cartella delle librerie aggiuntive, che puoi creare dove vuoi (basta che poi metti il path come hai fatto) e sono 4:
B4A
B4J
B4i
B4X

Le varie librerie che non vengono fornite con l'installazione, quindi le librerie aggiuntive, le metterai in queste cartelle; quelle con estensione .b4xlib nella cartella B4X, quelle con estensione .jar nella cartella della specifica piattaforma.

-------------------------

(*) Dopo che avrai messo i file nella cartella SharedFiles, nella B4XMainPage dovrai fare CTRL+Click su questo commento:
1610105168938.png

in modo che i file vengano copiati/sincronizzati dalla SharedFiles alla cartella Files del progetto sul quale stai lavorando.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
"English".

When you create a B4XPages project, 4 folders are created, one for each platform (B4A, B4J, B4i), which contain the files of your project (ProjectName.b4a in the B4A folder, ProjectName.b4j in the B4J folder, ...) and SharedFiles, in which you will have to place all the files used by the projects (*), such as image files, sounds, etc...

The library folders have nothing to do with those 4 folders! These are mainly 2:
a - the internal libraries folder (which name is Libraries), which is located in the platform installation folder, i.e. where you installed B4A, where you installed B4J...
b - the additional libraries folder, which you can create wherever you want (just write the path as you did) and are 4:
B4A
B4J
B4i
B4X

You must put the libraries that are not supplied with the installation, so the additional libraries, in these folders; those with .b4xlib extension in the B4X folder, those with .jar extension in the specific platform folder.

--------------------------

(*) After you put the files in the SharedFiles folder, in the B4XMainPage you will need to CTRL + Click on this comment:
1610105483227.png

so that the files are copied / synchronized from the SharedFiles to the Files folder of the project you are working on.
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
In italiano? Sorry.

Quando crei un progetto B4XPages vengono create 4 cartelle, una per ogni piattaforma (B4A, B4J, B4i), che contengono i file del tuo progetto (NomeProgetto.b4a nella cartella B4A, NomeProgetto.b4j nella B4J, ...) e SharedFiles, nella quale dovrai mettere tutti i file utilizzati dai progetti (*), come i file immagine, suoni, etc..

Le cartelle delle librerie non hanno niente a che fare con quelle 4 cartelle! Queste sono principalmente 2:
a - la cartella delle librerie interne (che si chiama Libraries), che si trova nella cartella di installazione della piattaforma, cioè dove hai installato B4A, dove hai installato B4J...
b - la cartella delle librerie aggiuntive, che puoi creare dove vuoi (basta che poi metti il path come hai fatto) e sono 4:
B4A
B4J
B4i
B4X

Le varie librerie che non vengono fornite con l'installazione, quindi le librerie aggiuntive, le metterai in queste cartelle; quelle con estensione .b4xlib nella cartella B4X, quelle con estensione .jar nella cartella della specifica piattaforma.

-------------------------

(*) Dopo che avrai messo i file nella cartella SharedFiles, nella B4XMainPage dovrai fare CTRL+Click su questo commento:
View attachment 105723
in modo che i file vengano copiati/sincronizzati dalla SharedFiles alla cartella Files del progetto sul quale stai lavorando.

Ciao Luca (ok in italiano) solo per questa risposta :)
Rispondo ai tuoi commenti:

1) "Quando crei un progetto B4XPages vengono create 4 cartelle..." --> si questo lo sapevo e mi era chiaro.

2) "a - la cartella delle librerie interne... b - la cartella delle librerie aggiuntive..." --> anche questo lo sapevo e mi è chiaro

3) Quello che non mi era molto chiaro è il perchè (in un progetto multi-piattaforma) devi per forza creare la cartella additional libraries duplicata per ogni piattaforma quando puoi (potenzialmente) e solo per i progetti di tipo B4X / B4XPages creare un unico folder "additional libraries" e mettere tutte le librerie dentro quel folder e far puntare gli IDE a quel folder.

4) "quelle con estensione .b4xlib nella cartella B4X" --> Ora penso di aver capito anche questa cosa. Ovvero, la cartella B4X in realtà non è nella struttura di folder del progetto ma è contenuta in una struttura a parte tipo ...\AdditionalLibraries\B4X (dove ci saranno anche le altre add libs specifiche per ogni piattaforma: B4A, B4i e B4j). Corretto ?
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
3) Quello che non mi era molto chiaro è il perchè (in un progetto multi-piattaforma) devi per forza creare la cartella additional libraries duplicata per ogni piattaforma quando puoi (potenzialmente) e solo per i progetti di tipo B4X / B4XPages creare un unico folder "additional libraries" e mettere tutte le librerie dentro quel folder e far puntare gli IDE a quel folder.
Non devi creare alcuna cartella "additional libraries" per un progetto. Questa cartella, che contiene le altre 4, è unica per tutte le piattaforme e per tutti i progetti che crei.
Ripeto, tu non devi creare alcuna cartella.

4) "quelle con estensione .b4xlib nella cartella B4X" --> Ora penso di aver capito anche questa cosa. Ovvero, la cartella B4X in realtà non è nella struttura di folder del progetto ma è contenuta in una struttura a parte tipo ...\AdditionalLibraries\B4X (dove ci saranno anche le altre add libs specifiche per ogni piattaforma: B4A, B4i e B4j). Corretto ?
Esatto ma tu le hai già, sono quelle "puntate" dai path impostati negli IDE.


Remember that there is also the italian forum, where we can understand each other better ;)
 
Upvote 0
Top