Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vinc3m1/android-segmentedradiobutton
Android implementation of iPhone's segmented control
https://github.com/vinc3m1/android-segmentedradiobutton
Last synced: about 2 months ago
JSON representation
Android implementation of iPhone's segmented control
- Host: GitHub
- URL: https://github.com/vinc3m1/android-segmentedradiobutton
- Owner: vinc3m1
- Archived: true
- Created: 2011-04-30T13:44:53.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2017-04-05T07:25:11.000Z (over 7 years ago)
- Last Synced: 2024-07-26T07:34:51.494Z (2 months ago)
- Language: Java
- Homepage:
- Size: 164 KB
- Stars: 485
- Watchers: 43
- Forks: 160
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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.
Screenshots
-----------![Segmented Toggle Button](https://github.com/makeramen/android-segmentedradiobutton/raw/master/screens/segmentedradio.png)
Usage
-----* For text-only buttons, you just need SegmentedRadioGroup.java 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](http://stackoverflow.com/questions/4519103/error-in-androids-clearcheck-for-radiogroup) for more info, and [this](https://code.google.com/p/android/issues/detail?id=4785) for a possible workaround.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/vinc3m1/android-segmentedradiobutton/trend.png)](https://bitdeli.com/free "Bitdeli Badge")