网上找了个自定义switch的例子,代码能用,但是,在Graphical Layout窗口,出现如下错误

OnMeasure函数如下
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
// TODO Auto-generated method stub
setMeasuredDimension(switch_on_Bkg.getWidth(), switch_on_Bkg.getHeight());
}
------解决方案--------------------
你的layout文件还有MySlipSwitch代码
------解决方案--------------------
运行没问题的话就不用管它