<@U1EEE6BST> yes, that was exactly what I did. Imp...
# android
d
@brianwernick yes, that was exactly what I did. Implementation is as simple as
Copy code
class DontPressWithParentRadioButton : AppCompatRadioButton {
  constructor(context: Context) : this(context, null)
  constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0)
  constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
  }

  override fun setPressed(pressed: Boolean) {
    if (pressed && parent is View && (parent as View).isPressed) {
      return
    }
    super.setPressed(pressed)
  }
}
and when I use it in my xml file it doesn't draw radiobutton drawable for some reason - only text. I didn't have a chance to dig into it yet.