What I think about this method:
ViewGroup
, which is subclass
of View
, can not accept View_instance
because of the inheritance hierarchy, so ViewGroup_instance
is working as container
for View_instance
.
It is correct?
The ViewGroup.addView()
methods have nothing to do at all with inheritance, those methods are just part of the ViewGroup
implementation(besides the inherited behavior from View
) to allow the adding of child views. The addView()
methods use the View
super class to allow the addition of any View
(simple view or layout grouping views).