AttributeSet 是接收xml中定义的属性信息,这不一定是自定义布局,不是自定义布局也有该属性,要不xml中定义的属性信息就无法接收了。
比如
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
这几行红,layout_width,layout_height,text都可以在AttributeSet 中接收到。
比如
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
这几行红,layout_width,layout_height,text都可以在AttributeSet 中接收到。