# AndroidTagGroup **Repository Path**: gybin/AndroidTagGroup ## Basic Information - **Project Name**: AndroidTagGroup - **Description**: A beautiful android tag group widget. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2015-02-16 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AndroidTagGroup [![Maven Central](https://maven-badges.herokuapp.com/maven-central/me.gujun.android.taggroup/library/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/me.gujun.android.taggroup/library) The AndroidTagGroup is a layout for a set of tags.You can use it to group people, books or anything you want. Also you can contribute new idea to me. # Demo ### Screenshot ![Demo screenshot](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/demo_screenshot.png) ### Append Tag ![Append mode](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/append_mode.png) ### Delete tag ![Delete tag](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/delete_tag.png) [Download Demo](https://github.com/2dxgujun/AndroidTagGroup/releases/download/v1.0/AndroidTagGroup-Demo-v1.0.apk) # Usage ## Step 1 #### Gradle ```groovy dependencies { compile 'me.gujun.android.taggroup:library:1.0@aar' } ``` #### Maven ```xml me.gujun.android.taggroup library 1.0 apklib ``` ## Step 2 Use it in your own code: ```xml ``` ```java TagGroup mTagGroup = (TagGroup) findViewById(R.id.tag_group); mTagGroup.setTags(new String[]{"Tag1", "Tag2", "Tag3"}); ``` I made some pre-design style. You can use them via `style` property. ![Present color](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/present_color.png) Use the present style just like below: ```xml ``` In the above picture, the style is: `TagGroup` `TagGroup.Beauty_Red` `TagGroup.Holo_Dark` `TagGroup.Light_Blue` `TagGroup.Indigo` You can get more beautiful color from [Adobe Color CC](https://color.adobe.com), and you can also contribute your color style to AndroidTagGroup! # Build run `./gradlew assembleDebug` (Mac/Linux) or run `gradlew.bat assembleDebug` (Windows) # Attributes There are several attributes you can set: ![Dimension illustrate](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/dimension_illustrate.png) | attr | default | mean | |:-----------------:|:----------------:|:-------------------------------------------------------:| | isAppendMode | false | Determine the TagGroup mode, APPEND or single DISPLAY. | | inputTagHint | Add Tag/添加标签 | Hint of the INPUT state tag. | | brightColor | #49C120 | The bright color of the tag. | | dimColor | #AAAAAA | The dim color of the tag. | | borderStrokeWidth | 0.5dp | The tag outline border stroke width. | | textSize | 13sp | The tag text size. | | horizontalSpacing | 8dp | The horizontal tag spacing.(Mark1) | | verticalSpacing | 4dp | The vertical tag spacing.(Mark2) | | horizontalPadding | 12dp | The horizontal tag padding.(Mark3) | | verticalPadding | 3dp | The vertical tag padding.(Mark4) | # License Copyright 2015 Jun Gu Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.