To really demonstrate the use of a custom layout, you need to try building something unusual. In the following example, you'll put together a
ViewGroup that arranges its children in a nice circle. It's not a very brilliant layout, nor is it particularly useful, but circles are nice to look at, and it would provide useful negative space in the screen center (which could be filled using a
CircleLayout.java, and open it in your editor or IDE.
CircleLayoutas extending the
public class CircleLayout extends ViewGroup
ViewGroupconstructors and have them delegate directly to the ...