Android Question View's Sender of the dynamically loading layout

peacemaker

Expert
Licensed User
Longtime User
Introduction: https://www.b4x.com/android/forum/t...ue-irrespective-of-object-type.38136/#content

Activity is loading panels with some layout into a ScrollView, slow, one by one.
User can see the already loaded items and tap them to show an image.
If next he chooses the seeing item - it needs to show some tag label lblTag (blue tag with qty).

upload_2017-10-3_18-4-29.png


B4X:
Sub ivGood_Click
    Dim v As ImageView = Sender
    Dim p As Panel = v.Parent
    lblTag = p.GetView(3)    'globally save the link to the view
    Setup_Good
End Sub

But loading is in progress and lblTag is ... turned out not the tapped item, but some next that loading this moment. But it was only one tap. And after all - the visible tag is on some next item.
Why ?
 

Attachments

  • upload_2017-10-3_18-3-50.png
    upload_2017-10-3_18-3-50.png
    37.2 KB · Views: 222
Last edited:

peacemaker

Expert
Licensed User
Longtime User
SOLVED: strange, it was no other "lblTag = .." assignments, but after renaming to a "lblTagg" - works OK.
 
Upvote 0
Top