当前位置: 代码迷 >> Android >> RadioGroup中有未定义步骤
  详细解决方案

RadioGroup中有未定义步骤

热度:33   发布时间:2016-04-28 00:41:03.0
RadioGroup中有未定义方法?
RaidoGroup源码中
public void onChildViewRemoved(View parent, View child) {
            if (parent == RadioGroup.this && child instanceof RadioButton) {
                ((RadioButton) child).setOnCheckedChangeWidgetListener(null);
            }

            if (mOnHierarchyChangeListener != null) {
                mOnHierarchyChangeListener.onChildViewRemoved(parent, child);
            }
        }


中的setOnCheckedChangeWidgetListener方法我怎么也找不到?为什么?是隐藏了?
------解决思路----------------------
setOnCheckedChangeWidgetListener 这个方法在CompoundButton类中,被隐藏了,只有android系统包里的类能访问,
------解决思路----------------------
这个方法在radiaoButton继承的CompoundButton中,这个方法现在是protected。