Android Question question about imageview

tufanv

Expert
Licensed User
Longtime User
Hello,

I am using

dim img(16) as imageview in my code module. But when i initialize all these imageviews from the code module how can i also see them on visual designer ? I have to use as img(16) but i also want to see them on deisgner ?

Is there any way to do it ?
 

Cableguy

Expert
Licensed User
Longtime User
The only way to do it is to add them in the designer and then "duplicate" them in an array.

Dim imgarray(15)
Dim i as int = 0
for each v as imageview in activity
Imgarray(i) = v
i = i + 1
Next
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
The only way to do it is to add them in the designer and then "duplicate" them in an array.

Dim imgarray(15)
Dim i as int = 0
for each v as imageview in activity
Imgarray(i) = v
i = i + 1
Next

Thank you !

I also want to add this to my b4i app but only problem is it does not use activity . I replaced it with page1 but that gives an error : object converted to string

any idea about that or do i have to ask it in b4i forum =)
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
There are a few diferences between b4a and b4i... I never used b4i but I guess it's a "view" object issue... In any case it should work with the image views parent
 
Upvote 0
Top