Android Question GetAllViewsRecursive

Hans- Joachim Krahe

Active Member
Licensed User
Hi there, I tried out to find a view by GetAllViewsRecursive - but in
__________________________________
For Each v As View In pnlLayout1.GetAllViewsRecursive
i = i+1

If v Is CheckBox Then
' analyse
.......

_________________________

... in v there ist neiter a name, nor eventname or a tag - even if I define a: ' dim cb as checkbox = v'

I find the text, but this should be kept editable, so I look for an other itemvalue, that keeps constant.

Is cb.name hidden anywhere or just not transported?


thanks


... o.k., got it:)
 
Last edited:

Hans- Joachim Krahe

Active Member
Licensed User
..thanks, I am new - I definded it only in designer first:) ..but did'nt really get your version run - needed to pick it out with GetAllViewsRecursive AND getView... but does'nt matter, it works fine:)

can it theoretically be optimised with 'Each cb as CheckBox In pnlLayout1.GetAllViewsRecursive

even if there are other views? getView woud'nd work any more, but it might be faster...





For Each v As View In pnlLayout1.GetAllViewsRecursive
i = i+1

If v Is CheckBox AND ex1 = 0 Then

Dim cb As CheckBox = pnlLayout1.GetView(i-1)


..... by the way: I dont get 'exit for' to run, if it's inside an if-condition, and it always is:)))



... and one more irritation, that took time: I initialized timer wrong with timer1(timer1_tick, 5000) and it directly went to timre1_tick without initialisation - took some time...:-(
 
Last edited:
Top