Android Question ICOSseekbar valuechanged() method

Najirm

Member
Licensed User
Longtime User
I use a seekbar from ICOSSeekbar library as below.

B4X:
Sub seekbar_ValueChanged(num As Int, bool1 As Boolean)
  If bool1 Then
  If num == 0 Then
  seekbar.Value = 1
  lbl.Text = 1 
 
  Else If num == 1 Then
  seekbar.Value = 1
  lbl.Text = 1
 
  Else If num == 2 Then
  seekbar.Value = 2
  lbl.Text = 2
 
 
  Else If num == 3 Then
  seekbar.Value = 3
  lbl.Text = 5
 
  Else If num == 4 Then
  seekbar.Value = 4
  lbl.Text = 10
 
 
  Else If num == 5 Then
  seekbar.Value = 5
  lbl.Text = 15
  End If
  End If
  CallSub("ClassName","MethodName")
End Sub

Once the seekbar is swiped CallSub("ClassName","MethodName") is called many times.

How can I call "CallSub("ClassName","MethodName")" only when the swipe is finished?
 

Najirm

Member
Licensed User
Longtime User
How can I modify the method so that the
CallSub("ClassName","MethodName")
is called only when swipe is released or dismissed?
 
Last edited:
Upvote 0
Top