Subclass Button with Android : lots of errors

后端 未结 2 1904
旧巷少年郎
旧巷少年郎 2021-01-26 16:09

I tried to subclass Button , but I have a lot of errors when launching my project. Could you have a look and tell me how to fix this? (I\'ve got maybe 50 errors com

2条回答
  •  有刺的猬
    2021-01-26 16:38

    Using the fully-qualified name for the element in the XML layout does not work if your Button subclass is an inner class. If this is the case, you need to add a class attribute and use the generic view for the element name.

    http://developer.android.com/guide/topics/ui/custom-components.html

提交回复
热议问题