1. 直接自定义。经过attrs.getAttributeXXXValue获取xml
2. 定义在attrs.xml文件中,经过Context.ObtainStyledAttributes和TypeArray.getxxx获取get