CheckBox Box=(CheckBox)findViewById(R.id.propertyStatus1);Box.setError("Error");
CheckBox cb=(CheckBox)findViewById(R.id.checkBox1); cb.setError("error");
首先,只显示错误图标.焦点移动时,将显示错误消息.
要获得对这些类型元素的关注,请添加android:focusableInTouchMode =“true”