Android implementation of iPhone's segmented control
Latest commit d7ae5a8 Sep 11, 2013 @vinc3m1 Merge pull request #10 from bitdeli-chef/master
Add a Bitdeli Badge to README

Segmented Radio Buttons for Android

This is my implementation of iOS's segmented controls for Android by extending RadioGroup and RadioButton. Example project included.


Segmented Toggle Button


  • For text-only buttons, you just need which extends RadioGroup, so all your standard RadioButton implementations and callbacks should work.

  • For image buttons, implement SegmentedRadioImageButton instead of RadioButton.

  • Drawables are included, but can easily be replaced.

  • See example project for usage

Known Issues

  • SegmentedRadioImageButton currently uses a custom implemented scaleType similar to CENTER_INSIDE and doesn't respect padding values. If anyone wants to extend the onDraw method to do so, that would be much appreciated.

  • RadioGroup has a bug that calls onCheckedChangedListener multiple times when you use clearCheck() or check() programmatically. See this for more info, and this for a possible workaround.

Bitdeli Badge