android - Custom linearlayout, on constructor get all childviews -
im having problem custom linearylayout, class inherits linearlayout.. nothing fancy.. thing need fetch child-views thats inside custom linearlayout.. have tried:
this.getchildcount(); but keeps returning zero, , im starting think maybe children hasent been added yet during time run code in constructor?
thanks in advance!
thanks alot! ended doing this:
@override protected void onfinishinflate () { super.onfinishinflate(); childs = this.getchildcount(); } since used childs variable in activity, , there needed set value before hit activity-oncreate..which solved :)
thanks guidence!
Comments
Post a Comment