ToggleButtons
Android toggle buttons that adhere to the Material Design documentation.
Install / Use
/learn @rcketscientist/ToggleButtonsREADME
Google finally released an official version:
MaterialButtonToggleGroup
I recommend using this instead unless a deficiency is found.
ToggleButtons
This library adds two custom widgets that adhere to the Material Design definition for toggle buttons. Library is backwards compatible to API 9.
You can add the library with:
compile 'com.anthonymandra:ToggleButtons:3.0.1'
Recent Changes
Version 3.0
Migrate to androidx. Required a bump to minSdk 14.
- Package name changed to
androidx.appcompat.widget.ToggleButton|ToggleGroup
Version 2.0
Adds backwards compatibility to API 9. This changed the api for dividers slightly.
- Divider is now in the custom namespace:
app:divider - Divider can no longer support tint. You'll need to create custom drawbles.
Basics
You can use <code>ToggleGroup</code> much like you would a <code>RadioGroup</code> and fill it with <code>ToggleButton</code>, or anything extending <code>CompoundButton</code>. See the Sample for examples.
When no text is present they will use a custom draw that allows proper image alignment. When text is present they will behave like a traditional <code>CompoundButton</code>, or the old android <code>ToggleButton</code>.

You can toggle exclusive selection or multi selection on a group and you can also allow unselecting (no selection at all). Buttons support tint.
Sample

Official Material Guidelines

Related Skills
diffs
344.1kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
clearshot
Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI images (photos, memes, charts) unless the user explicitly wants to build a UI from them. Does NOT trigger on HTML source code, CSS, SVGs, or any code pasted as text.
openpencil
2.0kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
