什么是iOS的UISegmentedControl
的良好Android类比?
什么是iOS的UISegmentedControl
的良好Android类比?
我在这里写了一个类似的实现:https://github.com/makeramen/android-segmentedradiobutton
它重写了 RadioGroup 而非 RadioButton,并且没有重写 onDraw 方法,因此 XML 样式仍然有效。
这里有一个很好的实现示例,由Benjamin Ferrari提供:http://blog.bookworm.at/2010/10/segmented-controls-in-android.html。他基本上只是覆盖了RadioButton。