Hi guys,
I am getting crazy while trying to modify my app working widget. The widget is very simple and has been working for months. Now I am tryng to modifiy but whatever Views I add in the L1 layout if I try to SetVisibility in the code I get :
Widget ErrorNoSuchFieldException) java.lang.NoSuchFieldException: widgetservice_imageview2
The L1 is shown below and I have really only added that ImageView2.
Why am I getting that error? What am I missing.
thanks!
I am getting crazy while trying to modify my app working widget. The widget is very simple and has been working for months. Now I am tryng to modifiy but whatever Views I add in the L1 layout if I try to SetVisibility in the code I get :
Widget ErrorNoSuchFieldException) java.lang.NoSuchFieldException: widgetservice_imageview2
B4X:
Public Sub rv_UpdateWidget
Dim ActiveAlerts As Int, ii As Int, ToBeAckCounter As Int, TempElem As AlertObj,AlertTextLocal As String
Try
If IsPaused("MQTTService") = True Then
rv.SetVisible("lblNextAlert",False)
rv.SetVisible("lblPrevAlert",False)
rv.SetText("lblAlertWdgt","" )
rv.SetText("lblAlertsCounter","0")
rv.SetVisible("lblTobeAck",False)
rv.SetVisible("lblTobeAckCounter",False)
rv.SetText("lblBrokerOK", "Disconnected")
rv.SetTextColor("lblBrokerOK",Colors.Black)
'rv.SetVisible("ImageView2",True) 'if I uncomment this line I get that error...
rv.UpdateWidget
Return
End If
.....
The L1 is shown below and I have really only added that ImageView2.
Why am I getting that error? What am I missing.
thanks!