While the value is between 1-2 it works, if it hits 3 or more it wont work it skips over the first IF. Why?
Here is my NEXT button click:
What I achieve from this is navigating through a web folder, getting the previous or next image and displaying it on the image view, while disabling/enabling the forward/back buttons at the start or the end of the tutorial's steps (ex: 1-5)
B4X:
Sub cmdBack_Click
If CurrentStepCount <= 2 Then
cmdBack.visible=True
cmdNext.visible=True
CurrentStepCount = CurrentStepCount - 1
Dim links As Map
links.Initialize
links.Put(imageBox,"http://" & urlDirectory & CurrentStepCount & ".png")
CallSubDelayed2(ImageDownloader, "Download", links)
tutorialLabel.Text = StepText(CurrentStepCount)
End If
If CurrentStepCount = 1 Then
Dim links As Map
links.Initialize
links.Put(imageBox,"http://" & urlDirectory & CurrentStepCount & ".png")
CallSubDelayed2(ImageDownloader, "Download", links)
tutorialLabel.Text = StepText(CurrentStepCount)
cmdBack.Visible=False
cmdNext.Visible=True
End If
End Sub
Here is my NEXT button click:
B4X:
Sub cmdNext_Click
If (CurrentStepCount < TutorialStepCount) Then
CurrentStepCount = CurrentStepCount + 1
Dim links As Map
links.Initialize
links.Put(imageBox, "http://" & urlDirectory & CurrentStepCount & ".png")
CallSubDelayed2(ImageDownloader, "Download", links)
tutorialLabel.Text = StepText(CurrentStepCount)
cmdNext.visible=True
cmdBack.Visible=True
End If
If CurrentStepCount = TutorialStepCount Then
tutorialLabel.Text = StepText(CurrentStepCount)
cmdNext.visible=False
cmdBack.Visible=True
End If
End Sub
What I achieve from this is navigating through a web folder, getting the previous or next image and displaying it on the image view, while disabling/enabling the forward/back buttons at the start or the end of the tutorial's steps (ex: 1-5)
Last edited: