GithubHelp home page GithubHelp logo

nkarasch / togglebuttons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rcketscientist/togglebuttons

0.0 1.0 0.0 156 KB

Android toggle buttons that adhere to the Material Design documentation.

License: MIT License

Java 100.00%

togglebuttons's Introduction

Download license

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:2.0.0'

Recent Changes

Version 3.0

Migrate to androidx. Required a bump to minSdk 14.

  1. 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.

  1. Divider is now in the custom namespace: app:divider
  2. Divider can no longer support tint. You'll need to create custom drawbles.

Basics

You can use ToggleGroup much like you would a RadioGroup and fill it with ToggleButton, or anything extending CompoundButton. 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 CompoundButton, or the old android ToggleButton.

image

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

screenshot_1500045520

Official Material Guidelines

materialtoggle

togglebuttons's People

Contributors

rcketscientist avatar nkarasch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.