Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I'm new to android, right now I am trying to find a way to get the number of controls (I don't know how to call these in android, I mean like I have 4 textviews, 2 edittexts, 3 buttons so in total I have 9 "controls"), is there any way to count them? Thanks in advanced. | |||
They're called Views in Android. Yes, even the buttons. Are you creating them in XML or programmatically? Is there a static number or are there ever going to be more or less? You can use getChildCount() but you'd have to do it recursively if you have views inside views. | |||
default
.
stackoverflow.comm
No comments:
Post a Comment