Android Custom View structurally understanding-problem
i have a structurally understanding-problem.

If i have a View (without onDraw) that includes another Views only, i must extend from a ViewGroup.

Then, any object that use the ViewGroup can add, remove etc. Elements from this ViewGroup. This must be forbidden. Because from outside, the Object is only a View. That i use intern a ViewGroup is uninteresting for external objects.

My realize would to extend from View and i delegate it to a private komposition from Type ViewGroup. But how i can resolve it?
Android Custom View structurally understanding-problem
===

i have a structurally understanding-problem.

If i have a View (without onDraw) that includes another Views only, i must extend from a ViewGroup.

Then, any object that use the ViewGroup can add, remove etc. Elements from this ViewGroup. This must be forbidden. Because from outside, the Object is only a View. That i use intern a ViewGroup is uninteresting for external objects.

My realize would to extend from View and i delegate it to a private komposition from Type ViewGroup. But how i can resolve it?