[LAMW] jsRecyclerView (OnClickItem) lazarus / 43-Android ---------------------------------------------------------------------- Odanka · 2021-07-10 12:53 I have multiple form in the Apps. Some code: Code: [Select]procedure TApps_Main.jsRecyclerView1ItemClick(Sender: TObject;   itemPosition: integer); begin   jsRecyclerView1.Refresh(itemPosition);   case itemPosition of     0:     begin       if AM_Kendaraan = nil then         gApp.CreateForm(TAM_Kendaraan, AM_Kendaraan);       AM_Kendaraan.Init(gApp);       AM_Kendaraan.Show;     end;   end; end; The above code will not work and the application immediately close (stopped) And this code work properly Code: [Select]procedure TApps_Main.Apps_MainClickOptionMenuItem(Sender: TObject;   jObjMenuItem: jObject; itemID: integer; itemCaption: string;   Checked: boolean); begin   case itemID of     // Kendaraan     1200:     begin       if AM_Kendaraan = nil then         gApp.CreateForm(TAM_Kendaraan, AM_Kendaraan);       AM_Kendaraan.Init(gApp);       AM_Kendaraan.Show;     end;   end; end;  Anyone please... Thank you.. ---------------------------------------------------------------------- jmpessoa · 2021-07-10 14:00 Hi, Odanka! 1) When did you update LAMW (how many days ago...)? 2) What your Android System  (7, 8, 9, ....) ? ---------------------------------------------------------------------- Mongkey · 2021-07-10 15:02 https://forum.lazarus.freepascal.org/index.php/topic,54916.0.html This one is also good start. ---------------------------------------------------------------------- Odanka · 2021-07-11 01:25 Quote from: jmpessoa on July 10, 2021, 04:00:45 pmHi, Odanka! 1) When did you update LAMW (how many days ago...)? 2) What your Android System  (7, 8, 9, ....) ? I have download the latest version of LAMW on 05/July/2021 and installed (last 6 days ago). I Use android system 10 (physical device) ---------------------------------------------------------------------- jmpessoa · 2021-07-11 02:03 QuoteI Use android system 10 (physical device) .... Yes,  there is some change related to security ... and now we are recommending coding all "gApp.CreateForm"  handling  "OnActivityCreate" event and then "Init/Show"  the forms later... when your logic requires..... Just 6 days ago we made a LAMW update to try keep up with these Android changes.... And yes,  handling ClickOptionMenuItem  "work properly" given the proximity of these two events in the LAMW architecture .... PS. Keep your LAMW updated! (we are working hard....)