更新时间:2023-11-19 10:11:10
我刚写了一个类似的实现在这里:https://github.com/makeramen/android-segmentedradiobutton
I just wrote a similar implementation here: https://github.com/makeramen/android-segmentedradiobutton
它覆盖,而不是单选按钮RadioGroup中并不会覆盖的OnDraw方法,以便XML的造型仍然有效。
It overrides RadioGroup instead of RadioButton and doesn't override the onDraw method so XML styling still works.