Hi,
I try to use xCustomlistview with xGauges v 1.8 and the code is as follows:
in update
In debug I check the xGauges1 = pnl.GetView(0).Tag is null and
in XGauges1.Value=v I received this error:
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runGoodChain(Shell.java:479)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:293)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
Thanks
Maurizio
I try to use xCustomlistview with xGauges v 1.8 and the code is as follows:
B4X:
Dim user As showtype
Dim lbtest As String
clv1.Clear
If userdata.showlist.Size>0 Then
Dim calc As Double
Dim str As String
For i=0 To userdata.showlist.Size-1
Dim p As B4XView = xui.CreatePanel("")
Dim width As Int = 100%x
Dim height As Int
user=userdata.showlist.Get(i)
If user.viewtype>2 And user.viewtype<6 Then
height = 25%y
p.SetLayoutAnimated(0, 0, 0, width, height)
p.Color=Colors.ARGB(255,39,116,124)
xGauges1.Initialize(Me,"xgauges")
xGauges1.AddToParent(p, 30dip, 0, GaugeWidth)
......
in update
B4X:
Sub updatedata (val As String)
If userdata.showlist.Size>0 Then
Dim data() As String
data = Regex.Split(",", val)
Dim v As Double
Dim typ As showtype
For i=0 To userdata.showlist.Size-1
typ = userdata.showlist.Get(i)
v=data(typ.byteindex)
If typ.viewtype>2 And typ.viewtype<6 Then
Dim pnl As B4XView = clv1.GetPanel(i)
xGauges1 = pnl.GetView(0).Tag
xGauges1.Value=v
Dim lbl As Label = pnl.GetView(2)
lbl.Text=v
End If
Next
End If
End Sub
In debug I check the xGauges1 = pnl.GetView(0).Tag is null and
in XGauges1.Value=v I received this error:
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runGoodChain(Shell.java:479)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:293)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
Thanks
Maurizio