说我有一个自定义的android视图:
public class myView extends ConstraintLayout {
在其ctor中,我称:
LayoutInflater.from(context).inflate(R.layout.header, this, true);
我看到inflate
返回了View
,但是调用代码根本没有使用它。那么如何影响呢?
此外,如果customView继承自constraintLayout但膨胀的xml是线性布局,会发生什么情况
为什么会起作用?