Hi,
I have an app with a SeekBar called SB. When I load activity I read SB initial value from a file and apply the value to the bar (SB.Value = s). But when I compile app shows a Java error: SB needs to be Initialized. So I wrote this:
When I'm typing SB.IsInitialized the IDE alerts me only to do that if SeekBar is not in designer. It is. But my phone alerts me that is not initialized, so I added the If ... Else anyway.
But when compiling code SeekBar never changes their value to match the s parameter, but no errors this time.
I have an app with a SeekBar called SB. When I load activity I read SB initial value from a file and apply the value to the bar (SB.Value = s). But when I compile app shows a Java error: SB needs to be Initialized. So I wrote this:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Config")
[...]
If SB.IsInitialized Then
SB.Value = s
Else
SB.Initialize("SeekBar1")
SB.Tag = s
SB.Value = SB.Tag
End If
[...]
But when compiling code SeekBar never changes their value to match the s parameter, but no errors this time.