Activity does't start two times behind

schimanski

Well-Known Member
Licensed User
Longtime User
I have add four MenuItems to one of my activity modules. One Item opens another activity module with StartActivity(KarteEinstellungen). The problem is, that the Activity 'KarteEinstellungen' doesn't opens, when I try to open it one after the other. The Activity is only shown again, when there is another events triggered in the meantime.


Activity module:

B4X:
Sub Activity_Create(FirstTime As Boolean)
...
   Activity.AddMenuItem2("Kartenquelle","Kartenquelle", LoadBitmap(File.DirAssets,"icon_quelle.png"))
   Activity.AddMenuItem2("Einstellungen","Einstellungen", LoadBitmap(File.DirAssets,"icon_einstellungen.png"))
   Activity.AddMenuItem2("Zielkoordinaten","Zielkoordinaten", LoadBitmap(File.DirAssets,"icon_gps.png"))
   Activity.AddMenuItem2("Info","Info", LoadBitmap(File.DirAssets,"icon_info.png"))
...
end sub
...
Sub Einstellungen_Click
   StartActivity(KarteEinstellungen)
End Sub
...

Second Activity modul:

B4X:
Sub Close_Click
   Activity.Finish
   StartActivity(Mapviewer2)
End Sub

The Sub Einstellungen_Click will be raised every time, but the activity opens never to times behind.

Thanks for every help....
 
Top