将控件直接写在xml布局文件中,运行时会调用控件的第二个构造方法,也就是参数为 (@NonNull Context context, @Nullable AttributeSet attrs)的构造方法