I would like to create a custom and composite view in android. My custom view will include 1 textview, 5 radiobuttons two buttons and some images. I don’t know how to do it. if there would be some example or code spinet, it would be nice..
Share
I think it could help you:
First you can define a RelativeLayout in xml, with all the elements you want on it, placed like you want.
Second, when you have that layout defined, you can develop a custom class, extending RelativeLayout, and inflate that layout in the constructor method of the class, something like this:
At this point, you can use oneTextView, oneRadioButton, etc., in your class in a normal way.