项目作者: qiugang

项目描述 :
@Deprecated. A view to edit tag just like EditText edit text.
高级语言: Java
项目地址: git://github.com/qiugang/EditTag.git
创建时间: 2016-04-07T17:05:21Z
项目社区:https://github.com/qiugang/EditTag

开源协议:MIT License

下载


EditTag


Android Arsenal

Just use it to edit tags like EditText edit text.

Demo

How to use

  • Add the dependency
  1. repositories {
  2. maven { url "https://jitpack.io" }
  3. }
  4. dependencies {
  5. compile 'com.github.qiugang:EditTag:{latest version}'
  6. }
  • Add EditTag View in your layout resource
  1. <me.originqiu.library.EditTag
  2. android:id="@+id/edit_tag_view"
  3. android:layout_width="match_parent"
  4. android:layout_height="wrap_content"
  5. app:tag_layout="@layout/view_sample_tag"
  6. app:delete_mode_bg="#FF4081"
  7. app:input_layout="@layout/view_sample_input_tag"></me.originqiu.library.EditTag>
  • Custom your Tag ,Input EditText layout resource
  • Set tag list : setTagList(List<String> yourTags)
  • Get tag list: getTagList()
  • Set input tag enable setEditable(true)
  • Add a tag addTag(String tagContent)
  • Remove tag: removeTag(String... tagValue)
  • Set Tag data changed callback: setTagAddCallBack(TagAddCallback tagAddCallBack) and setTagDeletedCallback(TagDeletedCallback tagDeletedCallback)
  • ⚠ When you custom input_layout layout, please use MEditText replaced EditText, in order to avoid some of the soft keyboard can not receive the delete action event

Todo

  • Delete single tag out of order

Thanks

License

  1. The MIT License (MIT)
  2. Copyright (c) 2015 OriginQiu
  3. Permission is hereby granted, free of charge, to any person obtaining a copy
  4. of this software and associated documentation files (the "Software"), to deal
  5. in the Software without restriction, including without limitation the rights
  6. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  7. copies of the Software, and to permit persons to whom the Software is
  8. furnished to do so, subject to the following conditions:
  9. The above copyright notice and this permission notice shall be included in all
  10. copies or substantial portions of the Software.
  11. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  12. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  13. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  14. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  15. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  16. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  17. SOFTWARE.