Playing with mail composer...
How to hide Mail composer when user send or cancel the mail ? (trying to catch mail_Complete Event and set mail.Show to Null)
How to hide Mail composer when user send or cancel the mail ? (trying to catch mail_Complete Event and set mail.Show to Null)
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Private Mail As MailComposer
Public NavControl As NavigationController
Private Page1 As Page
Private Button1 As Button
Private txtassumpte As TextField
Private txtBody As TextField
Private txtmail As TextField
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("prova")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
Page1.RootPanel.LoadLayout("prova")
NavControl.ShowPage(Page1)
Mail.Initialize("")
End Sub
Private Sub Page1_Resize(Width As Int, Height As Int)
End Sub
Private Sub Application_Active
End Sub
Private Sub Application_Inactive
End Sub
Private Sub Application_Background
End Sub
Sub BtnSend_Click
Mail.SetToRecipients (Array(txtmail.text))
Mail.SetSubject (txtassumpte.Text)
Mail.SetBody(txtBody.Text,True)
Mail.Show (Page1)
End Sub
Sub Mail_Complete (res As Int)
Mail.Show (Null)
End Sub