Android Question xCLV Expandable - Sleep not resumed (context is paused)

yiankos1

Active Member
Licensed User
Hello,
I use xCLV expandable items. When i click an item there is a possibility(random number) to show an advertisement. If ad shown, at log says this
B4X:
Sleep not resumed (context is paused): anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub
Sleep not resumed (context is paused): b4a.example3.customlistview$ResumableSub_PanelClickHandler
and item does not collapse or expand, it stucks.
if i comment out this line at CLVExpandable Class:
B4X:
'Sleep(mCLV.AnimationDuration)
it works fine even if shows an ad, but animation is really bad.

Code at my app is this:
B4X:
Sub clvSaved_ItemClick (Index As Int, Value As Object)
    expandable.ToggleItem(Index)
    intAder
End Sub
B4X:
Sub intAder

    Dim random As Int
    random=Rnd(0,28)
    Log(random)
    If random=21 Then
        If IAd.Ready Then
            IAd.Show
        End If
    End If

End Sub
I tried callsubdelayd calling intAder but with no luck. Any ideas?
Thank you for your time.
 

yiankos1

Active Member
Licensed User
A simple way to solve it is by calling Sleep(mCLV.AnimationDuration + 10) before starting the next activity.
so if i understand well, i should add this sleep before calling intAder. Right?
 
Top