在view.java中obtainStyledAttributes来获取属性值,而在attrs.xml中的<declare-styleable name="View">并没有定义layout_height,如何在布局文件中使用android:layout_height的
------解决方案--------------------
我猜大概是因为View是一个基类吧,TextView等等就应该有height了
------------------------------------------------------AutoCSDN签名档------------------------------------------------------
码农场——码农播种代码、放牧思想的农场。