• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

rcketscientist/ToggleButtons: Android toggle buttons that adhere to the Material ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

rcketscientist/ToggleButtons

开源软件地址(OpenSource Url):

https://github.com/rcketscientist/ToggleButtons

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

Google finally released an official version:

MaterialButtonToggleGroup

I recommend using this instead unless a deficiency is found.

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

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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap