Android Compound View Usage
Usually I use this approach when I want to create custom views but I don't implement actions inside the view, instead I am using a callback like the click listener :).

Also another minor thing is that there is no need to do getChildAt() so you can find a specific view from a child view if you don't happen to have id's with the same names. Instead you can call findViewById directly on this(the root view).