最简单的Android教程之自定义控件 新建title.xml,完成布局 新建一个TitleLayout继承 LinearLayout. activity_main.xml中引用 Run your applicaiton , and try ! 传送门:https://github.com/newcaoguo/CustomWidgetDemo