Android Question Closing an App From A Button

geekbot71

New Member
Hi I have been using VB for years and have just started using B4A and I was wondering what code I can use to shut the app down from a button on the screen? I tried Exit as I would in VB and got an Error Any help would be greatly appreciated.
 

mangojack

Expert
Licensed User
Longtime User
I 'm presuming you mean a button you have added to your app ..
Right click on button in Designer > Generate > Click

B4X:
Sub Button_Click

    Activity.Finish
   
End Sub

Cheers mj
 
Upvote 0
Top