Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check it out #33

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f347a29
updated SDK, removed demoapp and bogus
shineangelic Mar 10, 2016
3404a06
so many changes. Refactored packages, externalized lib, minor DemoAp…
shineangelic Mar 10, 2016
cc7bfb4
trying to make more sense of TagView
shineangelic Mar 11, 2016
d9e5b03
some progress - WIP
shineangelic Mar 13, 2016
3fd4f03
making some senso out of it
shineangelic Mar 14, 2016
5d752b0
still other improvements
shineangelic Mar 15, 2016
81086b2
finalazind what works deprecation starts
shineangelic Mar 15, 2016
7d21325
fixed group remove
shineangelic Mar 15, 2016
af09c91
autocolor, offset fix
shineangelic Mar 15, 2016
3a7a573
minor tuning, clean
shineangelic Mar 15, 2016
a033706
demo enhancements
shineangelic Mar 16, 2016
da00876
constants, minor fixes
shineangelic Mar 16, 2016
b22811c
constants, minor fixes
shineangelic Mar 16, 2016
79bc164
removed bogus, 1.0.1
shineangelic Mar 16, 2016
aa6b920
updated readme, rel notes, textSize support
shineangelic Mar 17, 2016
dc1cacc
colors by Asfodel, context fix
shineangelic Mar 18, 2016
d75e2ba
font-awesome support
shineangelic Mar 19, 2016
7b5f0cb
font-awesome updated to 4.5.0, 605 icons
shineangelic Mar 19, 2016
de19730
README updated
shineangelic Mar 19, 2016
6d31023
1.2.1 start, default hashTag
shineangelic Mar 19, 2016
4c5d67f
removed menu, javadoc, lint
shineangelic Mar 20, 2016
b2e2478
lint, tests, fixes
shineangelic Mar 21, 2016
7697990
readme, javadoc
shineangelic Mar 21, 2016
db0319b
1.2.2 root
shineangelic Mar 24, 2016
91f0b05
1.2.2 final
shineangelic Mar 29, 2016
bfc5f5e
1.2.2 final
shineangelic Jan 21, 2017
9d1952f
rest of update to fa 470
shineangelic Jan 21, 2017
ec758dd
.ttf
shineangelic Jan 21, 2017
417cacb
align to androidX
Oct 29, 2019
c41eca3
updated libs
shineangelic Oct 29, 2019
6e5d3b5
Merge remote-tracking branch 'origin/master'
shineangelic Oct 29, 2019
cb05eff
1.4.1
shineangelic Oct 29, 2019
5805a22
1.4.1 release
shineangelic Oct 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 18 additions & 16 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 67 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,93 @@
#Android TagView
Android TagView-HashTagView
# Android SimpleTagView
Android SimpleTagView derived from Cüneyt Çarıkçi

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-TagView-green.svg?style=flat)](https://android-arsenal.com/details/1/2566)
This lib includes two customViews:
* **SimpleTagView** to show wrapped TextViews in the form of tags with icon and delete capability
* **SimpleTagRelativeLayout** to dynamically add and remove tags within a custom RelativeLayout.
* Additional static function to expose **font-awesome** functions

Simple android view to display collection of colorful tags efficiently.
You can edit the tag's style, and set listener of selecting or deleting tag.
Example usages can be found in example project.

#Screen
<img src="http://s11.postimg.org/rry7lw877/Screenshot_2015_09_29_21_17_53.png"></img>
<img src="http://i.giphy.com/3oEduFls2tAwrOALzG.gif"></img>
Lib was forked from Cüneyt ViewTag, but I tried to expose also single-tagView API,
not forcing the user to pass thru a *containing* RelativeLayout view. SimpleTagView
is simpler, since it uses <merge> layout, but also supports **font-awesome** to put an icon on your TAGs.
You can edit the tag's color and set listener for selecting or deleting.


#Feature
* Editable Style of Text, such as Font size and color.
* Editable Style of Tag, Background/Pressed Color, Radius effect, Custom Background, Delete mode.
* SimpleTagView extends GroupView, it represents a single TAG. Can be deletable or not
* SimpleTagRelativeLayout is a group of TAGs, allowing add, removal and listeners.
* Listener of tag selecting and deleting.
* Font-awesome 4.7.0 native support
* Can be created from XML file or Java code.

#Usage
<pre style='color:#000000;background:#ffffff;'><span style='color:#a65700; '>&lt;</span><span style='color:#5f5035; '>cuneyt.example.com.tagview.Tag.TagView</span>
![demo app screenshot](https://10428.https.cdn.softlayer.net/8010428/dal05.objectstorage.softlayer.net/v1/AUTH_3c173d3a-8847-45dc-9d93-faf1d6e70fe5/screenshots/fe21ca31-54a8-4c80-ae49-7bfe6ea936c7)

# Usage
You'll need to add gradle dependency from *jcenter()* as usualadding the following
to your *build.gradle*

<pre>
compile 'it.angelic:tagView:1.4.0'
</pre>

## Usage in XML
After having declared the namespace, with something like <pre>xmlns:tagview="http://schemas.android.com/apk/res-auto"</pre>
you may declare a Tag group like this:

<pre style='color:#000000;background:#ffffff;'><span style='color:#a65700; '>&lt;</span><span style='color:#5f5035; '>it.angelic.tagviewlib.SimpleTagRelativeLayout</span>
<span style='color:#007997; '>android</span><span style='color:#800080; '>:</span><span style='color:#274796; '>id</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>@+id/tag_group</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>android</span><span style='color:#800080; '>:</span><span style='color:#274796; '>layout_width</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>match_parent</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>android</span><span style='color:#800080; '>:</span><span style='color:#274796; '>layout_height</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>match_parent</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>android</span><span style='color:#800080; '>:</span><span style='color:#274796; '>layout_margin</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>10dp</span><span style='color:#800000; '>"</span> <span style='color:#a65700; '>/></span>
</pre>

or a single tag like this:

<pre style='color:#000000;background:#ffffff;'><span style='color:#a65700; '>&lt;</span><span style='color:#5f5035; '>it.angelic.tagviewlib.SimpleTagView</span>
<span style='color:#007997; '>android</span><span style='color:#800080; '>:</span><span style='color:#274796; '>id</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>@+id/myTestTag</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>android</span><span style='color:#800080; '>:</span><span style='color:#274796; '>layout_width</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>match_parent</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>android</span><span style='color:#800080; '>:</span><span style='color:#274796; '>layout_height</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>match_parent</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>tagview</span><span style='color:#800080; '>:</span><span style='color:#274796; '>tagColor</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>@android:color/holo_purple</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>tagview</span><span style='color:#800080; '>:</span><span style='color:#274796; '>tagAwesome</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>fa-hand-spock-o</span><span style='color:#800000; '>"</span>
<span style='color:#007997; '>tagview</span><span style='color:#800080; '>:</span><span style='color:#274796; '>titleText</span><span style='color:#808030; '>=</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>My HashTag</span><span style='color:#800000; '>"</span> <span style='color:#a65700; '>/></span>
</pre>

<pre>
TagView tagGroup = (TagView)findviewById(R.id.tag_view);
//You can add one tag
tagGroup.addTag(Tag tag);
## Usage in code
You can add one tag inside SimpleTagRelativeLayout:
<pre>
SimpleTagRelativeLayout tagGroup = (SimpleTagRelativeLayout) findviewById(R.id.tag_view);
tagGroup.addTag(SimpleTagView tag);
//You can add multiple tag via ArrayList
tagGroup.addTags(ArrayList<Tag> tags);
//Via string array
addTags(String[] tags);


//set click listener
tagGroup.setOnTagClickListener(new OnTagClickListener() {
//click listener example
tagGroup.setOnTagClickListener(new OnTagClickListener() {
@Override
public void onTagClick(Tag tag, int position) {
}
});

//set delete listener
tagGroup.setOnTagDeleteListener(new OnTagDeleteListener() {
@Override
public void onTagDeleted(final TagView view, final Tag tag, final int position) {
}
});
});
//delete listener example
tagGroup.setOnTagDeleteListener(new OnTagDeleteListener() {
@Override
public void onTagDeleted(final TagView view, final Tag tag, final int position) {
}
});
</pre>

Or you can add SimpleTagView directly to your Views like this:
<pre>
SimpleTagView tagTer2 = new SimpleTagView(getApplicationContext());
tagTer2.setText("Programmatic Deletable");
//Set font-awesome icon to be used
tagTer2.setFontAwesome("fa-warning");
tagTer2.setDeletable(true);
</pre>

#Sample APK
https://www.dropbox.com/s/m1y1npssj5b4bck/app-debug.apk?dl=0

#Libraries Used
<a href="http://jakewharton.github.io/butterknife/">ButterKnife by Jake Wharton</a></br>
<a href="https://github.com/drakeet/MaterialDialog">MaterialDialog by drakeet</a>
# Libraries & Credits
<a href="http://jakewharton.github.io/butterknife/">ButterKnife</a> by Jake Wharton

#License
Copyright 2015 Cüneyt Çarıkçi.
<a href="http://fontawesome.io">Font Awesome</a> by Dave Gandy

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
Copyright 2016 [email protected] forking <a href="https://github.com/Cutta/TagView">Cüneyt Çarıkçi</a>

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.

29 changes: 29 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 1.4.0
* Updated to Android 9

# 1.3.0
* Updated to Font-awesome 4.7.0

# 1.2.2
* better font-awesome APIs
* some unit-testing

# 1.2.1
* unit testing, lint fixes, bugfixes

# 1.2.0
* font-awesome support

# 1.1.0
* text size support in XML

# 1.0.1
* Adjustments for publish
* Published on [bintray](https://bintray.com/shineangelic/maven/SimpleTagView/view#)

# 1.0.0
* First test release
* SimpleTagView added

# Fork
* forked from Cutta's [TagView](https://github.com/Cutta/TagView/)
2 changes: 1 addition & 1 deletion TagView.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="TagView" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<module external.linked.project.id="TagView" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
Expand Down
Loading