您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
三六零分类信息网 > 焦作分类信息网,免费分类信息发布

not using the 2

2026/3/19 14:28:30发布8次查看
android 在使用自定义控件的时候,会提示这样的错误信息: not using the 2- or 3-argument view constructors; xml attributes will not work 往是由于你只定义了一个构造函数,解决方法就是至少要定义两个构造函数 处理如下: public slidebutton(context
android 在使用自定义控件的时候,会提示这样的错误信息:
not using the 2- or 3-argument view constructors; xml attributes will not work
往是由于你只定义了一个构造函数,解决方法就是至少要定义两个构造函数
处理如下:
public slidebutton(context context) { super(context); initbitmap(); } public slidebutton(context context, attributeset attrs){ super(context,attrs); initbitmap(); } public slidebutton(context context,attributeset attrs,int defstyle){ super(context,attrs,defstyle); initbitmap(); }
如果你只写了第一个构造函数,那么就会扡这个错误,至少要写上第二个或第三个构造函数才可以!!
焦作分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product