Skip to content

Commit

Permalink
1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
2dxgujun committed Feb 28, 2015
1 parent 43dc988 commit e004f07
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 8 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Also you can contribute new idea to me.
# Demo

### Screenshot
![Demo screenshot](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/demo_screenshot.png)
![Demo screenshot](http://ww2.sinaimg.cn/large/bce2dea9gw1epouvl2mvuj20dw0ehmyb.jpg)

### Append Tag
![Append mode](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/append_mode.png)
![Append mode](http://ww4.sinaimg.cn/large/bce2dea9gw1epouw5y9ijj20dw06dt8x.jpg)

### Delete tag
![Delete tag](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/delete_tag.png)
![Delete tag](http://ww3.sinaimg.cn/large/bce2dea9gw1epouweadrqj20dw05dglt.jpg)

[Download Demo](https://github.com/2dxgujun/AndroidTagGroup/releases/download/v1.0/AndroidTagGroup-Demo-v1.0.apk)

Expand Down Expand Up @@ -58,9 +58,16 @@ TagGroup mTagGroup = (TagGroup) findViewById(R.id.tag_group);
mTagGroup.setTags(new String[]{"Tag1", "Tag2", "Tag3"});
```

Use `setTags(...)` to set the initial tags in the group.

To "submit" a new tag as user press "Enter" or tap the blank area of the tag group, also you can "submit" a new tag via `submitTag()`.
To delete a tag as user press "Backspace" or double-tap the tag which you want to delete.

**Note**: Google keyboard (a few soft keyboard not honour the key event) currently not supported "Enter" key to "submit" a new tag and "Backspace" key to delete a tag.

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)
![Present color](http://ww4.sinaimg.cn/large/bce2dea9gw1epouwn8og4j20dw0a5aal.jpg)

Use the present style just like below:

Expand Down Expand Up @@ -92,7 +99,7 @@ run `gradlew.bat assembleDebug` (Windows)

There are several attributes you can set:

![Dimension illustrate](https://raw.github.com/2dxgujun/AndroidTagGroup/master/assets/dimension_illustrate.png)
![Dimension illustrate](http://ww2.sinaimg.cn/large/bce2dea9gw1epov0i8x6kj20rk054q4g.jpg)

| attr | default | mean |
|:-----------------:|:----------------:|:-------------------------------------------------------:|
Expand Down
Binary file removed assets/append_mode.png
Binary file not shown.
Binary file removed assets/delete_tag.png
Binary file not shown.
Binary file removed assets/demo_screenshot.png
Binary file not shown.
Binary file removed assets/dimension_illustrate.png
Binary file not shown.
Binary file removed assets/present_color.png
Binary file not shown.
2 changes: 1 addition & 1 deletion demo/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<string name="tags_default">标签(默认)</string>
<string name="tags_small">标签(小号)</string>
<string name="tags_large">标签(大号)</string>
<string name="submit">Submit</string>
<string name="submit" translatable="false">Submit</string>
</resources>
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

VERSION_NAME=1.1
VERSION_CODE=2
VERSION_NAME=1.2-SNAPSHOT
VERSION_CODE=3
GROUP=me.gujun.android.taggroup

POM_DESCRIPTION=Android Library to display a set of tags
Expand Down

0 comments on commit e004f07

Please sign in to comment.