widget problem

mkvidyashankar

Active Member
Licensed User
Longtime User
I am trying to catch a click event from an image view, but not getting it. Any thing wrong in the code :BangHead:
B4X:
'Service module
Sub Process_Globals
   'These global variables will be declared once when the application starts.
   'These variables can be accessed from all modules.
  Dim rv As RemoteViews
  Dim images As String
End Sub
Sub Service_Create
   rv=ConfigureHomeWidget("layout1","rv",0,"Click Me")
   
End Sub

Sub Service_Start (StartingIntent As Intent)
    If rv.HandleWidgetEvents(StartingIntent) Then Return
End Sub

Sub Service_Destroy

End Sub
Sub rv_Disabled
   StopService("")
End Sub
Sub ImageView1_Click
   ToastMessageShow("Clicked",True)
End Sub
 
Last edited by a moderator:
Top