我有一些看法,并想获得以像素为单位的高度。从构造函数我调用
attrs.getAttributeIntValue("http://schemas.android.com/apk/res/android", "layout_height", -1)
Run Code Online (Sandbox Code Playgroud)
并且总是得到默认值,但是
attrs.getAttributeValue("http://schemas.android.com/apk/res/android", "layout_height")
Run Code Online (Sandbox Code Playgroud)
工作正常。有什么问题attrs.getAttributeIntValue?