当前位置:   article > 正文

Android中继承RadioButton后,点击不能选中

android recyclerview radiobutton 选不中

在继承RadioButton的时候,覆改构造方法的时候要确保

  1. public RadioButton(Context context, AttributeSet attrs) {
  2.         this(context, attrs, com.android.internal.R.attr.radioButtonStyle);}

这个构造方法被调用。必须在子类中调用super(Context context, AttributeSet attrs)方法。否则RadioButton子类不能选中。

转载于:https://my.oschina.net/KobeGong/blog/469061

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/733740
推荐阅读
相关标签
  

闽ICP备14008679号