重写控件时错误解决

例1: 用MyTextView重写了TextView但是在XML文件中写的时候它提示说 Custom view * is not using the 2- or 3-argument View constructors; XML attributes will not work 并且运行后报错; 只要在MyTextView中写上全部的构造函数就可以解决;

你可能感兴趣的:(重写控件时错误解决)