我做了一个这样的customView
class MyCustomView extends View {
public MyCustomView(Context context, AttributeSet attrs,
int defStyle) {
super(context, attrs, defStyle);
}
}
我已经在布局中使用了它并给定属性将其高度设置为 WRAP_CONTENT,但是在 UI 上它覆盖了整个屏幕?为什么会这样?是什么让它全屏显示?
当我去 setBackgroundColor() 时,它也不起作用