0

I have a lot of views. And I like to have them placed in the program, taking the size of the screen in account. But I have a problem accessing the views in a loop.

Now, I have to take one view at the time:

view1.top = xdip
view2.top = xdip

What I really want to do is:

for c = 1 to 40
    view(c).top = ...
next

But I can't get it to work. Can anyone enlighten me?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
WizardOz
  • 103
  • 2

1 Answers1

2

See this tutorial.

Here is an example:

For i = 0 To Activity.NumberOfViews - 1
    Dim v As View
    v = Activity.GetView(i)
    v.Top = 30dip
Next
Erel
  • 1,802
  • 2
  • 15
  • 58