LAMW: Splash Screen
lazarus / 43-Android
----------------------------------------------------------------------
c4p · 2018-03-30 20:26
Shame there isn't an option to add a splash screen to Android app like
in Delphi as my app would really benefit from one.
Manually create a splash screen?
----------------------------------------------------------------------
jmpessoa · 2018-03-30 20:57
Hi c4p!
Yes, you can add a splash screen!
Look for "AppDemo1" and the
new "AppDBGridViewDemo1" [by Martin Lowry] in LAMW 0.8 preview!
LAMW 0.8 preview is here: https://od.lk/f/Ml8xNTU4Mjc1NDVf [Please,
test it!!!]
demos preview is here: https://od.lk/f/Ml8xNTU3ODQyMDlf
Ok. There is some trick...
1) You need set your "splash" form property "ActivityMode= actSplash"
2) You need edit "*.lpi" ... add a new line in "CustomData" like:
3) Maybe, you need edit ".lpr" , too!
here:
Code: [Select]procedure pAppOnCreate(PEnv: PJNIEnv; this: JObject;
context: JObject;
layout: JObject; intent: JObject); cdecl;
begin
Java_Event_pAppOnCreate(PEnv, this, context, layout, intent);
MyAndroidModuleSplash.Init(gApp);
end;
and here:
Code: [Select]....
.....
gApp.CreateForm(TMyAndroidModuleSplash, MyAndroidModuleSplash);
----------------------------------------------------------------------
c4p · 2018-04-01 08:23
Fantastic!
Can't believe I missed this.
I will try it
----------------------------------------------------------------------
jmpessoa · 2018-04-01 18:30
Yes, and LAMW 0.8 has improved support to make splash!
Only change here:
Quote
OR
Change/rename the splash form property name.... [after change main
form property name]
----------------------------------------------------------------------
c4p · 2018-04-02 15:24
Cool, thanks!