Skip to content

Commit

Permalink
- update readme file, update res file
Browse files Browse the repository at this point in the history
  • Loading branch information
alhazmy13 committed Aug 25, 2016
1 parent fcc49a6 commit c43a199
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 63 deletions.
39 changes: 8 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
# `AndroidTagGroup`

[![Release 1.4](https://img.shields.io/badge/Release-1.4.1-green.svg)](https://github.com/2dxgujun/AndroidTagGroup/releases)
[![Release 1.5](https://img.shields.io/badge/Release-1.5-green.svg)](https://github.com/alhazmy13/AndroidTagGroup/releases)
[![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)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AndroidTagGroup-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1539)
[![Build Status](https://travis-ci.org/2dxgujun/AndroidTagGroup.png?branch=master)](https://travis-ci.org/2dxgujun/AndroidTagGroup)


The TagGroup is a special layout with a set of tags. You can use it to tag people, books or anything you want.

Also you can contribute new idea to me.

# Demo

### Screenshot
![screenshot1](http://ww4.sinaimg.cn/large/bce2dea9jw1esbsby9v5fj20u00w8jxx.jpg)

### Edit Tags
![screenshot2](http://ww4.sinaimg.cn/large/bce2dea9jw1esbsbngv8fj20u005w75v.jpg)
![screenshot3](http://ww4.sinaimg.cn/large/bce2dea9jw1esbsbmoagij20u005sabl.jpg)
![screenshot1](https://cloud.githubusercontent.com/assets/4659608/17962806/2570fca0-6abb-11e6-93c8-62287977a029.gif)

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

# Usage

Expand All @@ -27,16 +20,16 @@ Also you can contribute new idea to me.
#### Gradle
```groovy
dependencies {
compile 'me.gujun.android.taggroup:library:1.4@aar'
compile 'net.alhazmy13.androidtaggroup:library:1.5.0'
}
```

#### Maven
```xml
<dependency>
<groupId>me.gujun.android.taggroup</groupId>
<groupId>net.alhazmy13.androidtaggroup</groupId>
<artifactId>library</artifactId>
<version>1.4</version>
<version>1.5.0</version>
<type>apklib</type>
</dependency>
```
Expand Down Expand Up @@ -71,13 +64,6 @@ To delete a tag as user press "Backspace" key or double-tap the tag which you wa
Implement a callback interface: `TagGroup.OnTagClickListener`, and set the listener via `setOnTagClickListener()`.


# Build

run `./gradlew assembleDebug` (Mac/Linux)

or

run `gradlew.bat assembleDebug` (Windows)

# Attributes

Expand All @@ -88,7 +74,8 @@ There are several attributes you can set:
| attr | default | mean |
|:------------------------- |:---------------- |:------------------------------------------------------- |
| atg_isAppendMode | false | Determine the TagGroup mode, APPEND or single DISPLAY. |
| atg_inputHint | Add Tag/添加标签 | The hint of the INPUT tag. |
| atg_showRemoveConfirmation | false | To show confirmation alert before remove any tag |
| atg_inputHint | null | The hint of the INPUT tag. |
| atg_borderColor | #49C120 | The tag outline border color. |
| atg_textColor | #49C120 | The tag text color. |
| atg_backgroundColor | #FFFFFF | The tag background color. |
Expand All @@ -107,16 +94,6 @@ There are several attributes you can set:
| atg_horizontalPadding | 12dp | The horizontal tag padding.(Mark3) |
| atg_verticalPadding | 3dp | The vertical tag padding.(Mark4) |

# Developed By

Jun Gu - <2dxgujun@gmail.com>

<a href="http://weibo.com/2dxgujun">
<img alt="Follow me on Weibo" src="http://ww4.sinaimg.cn/large/bce2dea9gw1epjhk9h9m6j20230233yb.jpg"/>
</a>
<a href="https://plus.google.com/u/0/113657331852211913645">
<img alt="Follow me on Google Plus" src="http://ww1.sinaimg.cn/large/bce2dea9gw1epjhbx0ouij2023023jr6.jpg"/>
</a>

# License

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
Expand Down
10 changes: 5 additions & 5 deletions demo/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<resources>
<string name="app_name">TagGroup-Demo</string>
<string name="title_activity_tag_editor">编辑标签</string>
<string name="add_tags">添加标签</string>
<string name="tags_default">标签(默认)</string>
<string name="tags_small">标签(小号)</string>
<string name="tags_large">标签(大号)</string>
<string name="title_activity_tag_editor">Edit</string>
<string name="add_tags">Add Tag</string>
<string name="tags_default">Default</string>
<string name="tags_small">Small</string>
<string name="tags_large">Large</string>
<string name="submit" translatable="false">Submit</string>
<string name="edit" translatable="false">Edit</string>
</resources>
52 changes: 52 additions & 0 deletions library/bintrayv1.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apply plugin: 'com.jfrog.bintray'

version = libraryVersion

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}

// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")

configurations = ['archives']
pkg {
repo = bintrayRepo
name = bintrayName
desc = libraryDescription
websiteUrl = siteUrl
vcsUrl = gitUrl
licenses = allLicenses
userOrg = 'alhazmy13'
publish = true
publicDownloadNumbers = true
version {
desc = libraryDescription
gpg {
sign = true //Determines whether to GPG sign the files. The default is false
passphrase = properties.getProperty("bintray.gpg.password")
//Optional. The passphrase for GPG signing'
}
}
}
}
33 changes: 28 additions & 5 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
//./gradlew bintrayUpload
ext {
bintrayRepo = 'maven'
bintrayName = 'AndroidTagGroup'

group='com.github.alhazmy13'
publishedGroupId = 'net.alhazmy13.androidtaggroup'
libraryName = 'library'

artifact = 'library'

libraryDescription = 'Android Tag Group'

siteUrl = 'https://github.com/alhzmy13/AndroidTagGroup'
gitUrl = 'https://github.com/alhzmy13/AndroidTagGroup.git'

libraryVersion = '1.5.0'

developerId = 'alhazmy13'
developerName = 'Abdullah Alhazmy'
developerEmail = 'me@alhazmy13.net'

licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
android {
compileSdkVersion 24
buildToolsVersion '24.0.0'
Expand All @@ -15,7 +37,8 @@ android {
productFlavors {
}
}
// Used to push in maven
//apply from: '../maven-push.gradle'

dependencies {
}
}
apply from: './bintrayv1.gradle'
apply from: './installv1.gradle'
42 changes: 42 additions & 0 deletions library/installv1.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apply plugin: 'com.github.dcendents.android-maven'

group = publishedGroupId // Maven Group ID for the artifact

install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
groupId publishedGroupId
artifactId artifact

// Add your description here
name libraryName
description libraryDescription
url siteUrl

// Set your license
licenses {
license {
name licenseName
url licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl

}
}
}
}
}
Loading

0 comments on commit c43a199

Please sign in to comment.