iOS的SegmentedControl相当于机器人机器人、iOS、SegmentedControl

2023-09-05 05:54:20 作者:林空鹿饮溪

什么是的iOS是一个很好的Andr​​oid模拟 UISegmentedControl

What is a good Android analog of iOS's UISegmentedControl?

推荐答案

我刚写了一个类似的实现在这里: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.