Android Question lon and short click on programming imageview array

DALB

Active Member
Licensed User
Hello everyone,

Sure you will survive, make care, keep isolated !

I have a question about imageview programmed as array for short an long click

maybe i've not seen all the forums and here is my question:

if I write this

B4X:
dim imview(100) as imageView

for i=0 to 100
    imview(i).intialize("makeThis")
next

How can I set an initialization with a short click and with a long click for my imgviews ?

example:

B4X:
for i=0 to 100

imgview(i).intialize("Short_click")     ??????????
imgview(i).intialize("LongClick_click") ??????????

next

I'va not seen this possibility with imview(i). _ _ _ _ _

Thanks much.
 

DALB

Active Member
Licensed User
Ah yes sir, it is so easy. I've to leave my old learnings about some codes.

Thanks you DonManfred, I see Corona will not attack you.
 
Upvote 0

Gustavo Schiffo

Member
Licensed User
Longtime User
Could you share the code you used to solve the problem? Because I have the same drama, I have to click on the ImageView number that I created previously.
Thank you

Code:

B4X:
For i = 0 To COUNTRIES.Size -1
                    Dim m As Map
                    m = COUNTRIES.Get(i)
                    x = m.Get("id")
                    'Posicion Imagen
                    img(x).Initialize(x)
                    img(x).Gravity = Gravity.FILL
                    
                    lbl(x).Initialize(x)
                    lbl(x).TextColor = Colors.Black
                    
                    sclPrincipal.Panel.AddView(img(x),l,t,w,h)
                    sclPrincipal.Panel.AddView(lbl(x),l+w+3dip,t,w,h)
                    
                    t = t + 27%y

Next
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…