求助,《第一行代码(第二版)》上如何添加自定义控件
androidstudio吧
全部回复
仅看楼主
level 3
千骥 楼主
首先我创建了一个名字叫title的一个布局文件,然后title内有两个按钮,新建了一个类,名字叫Title_Layout,然后在注册时写了Title_Layour的文件,但是系统自己添加了一句
tools:ignore="MissingConstraints"
之后我重新运行程序,程序不显示
是掉了什么操作吗?
2019年09月25日 07点09分 1
level 3
千骥 楼主
<com.enzesudio.uicustomview.TitleLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="MissingConstraints" />
这是我注册的部分,系统添加的是说少约束,但是少什么约束呢?
2019年09月25日 08点09分 2
level 3
千骥 楼主
这个是TitleLayout的class文件
2019年09月25日 08点09分 3
level 3
千骥 楼主
有人吗?
2019年09月26日 05点09分 4
1