diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c8ce156da..95ce2d5481 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,12 @@ # Change Log -Version 0.2.0 *(In development)* +Version 0.2.0 *(2016-03-29)* -------------------------------- +- Add Recent Emojis Tab [\#13](https://github.com/vanniktech/Emoji/pull/13) ([vanniktech](https://github.com/vanniktech)) +- Adding new emojis [\#9](https://github.com/vanniktech/Emoji/pull/9) ([vanniktech](https://github.com/vanniktech)) +- Add Library resource config file. Fixes \#6 [\#7](https://github.com/vanniktech/Emoji/pull/7) ([vanniktech](https://github.com/vanniktech)) + Version 0.1.0 *(2016-03-12)* ---------------------------- diff --git a/README.md b/README.md index e62ff9e32f..faad21c2e4 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,18 @@ [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Emoji-green.svg?style=true)](https://android-arsenal.com/details/1/3287) [![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) -A simple library to add Emoji support to your Android Application. In a PopupWindow Emojis can be chosen. In order to edit and display text with Emojis this library provides public APIs: [`EmojiEditText`](library/src/main/java/com/vanniktech/emoji/EmojiEditText.java) & [`EmojiTextView`](library/src/main/java/com/vanniktech/emoji/EmojiTextView.java). +A simple library to add Emoji support to your Android app. In a PopupWindow Emojis can be chosen. In order to edit and display text with Emojis this library provides public APIs: [`EmojiEditText`](library/src/main/java/com/vanniktech/emoji/EmojiEditText.java) & [`EmojiTextView`](library/src/main/java/com/vanniktech/emoji/EmojiTextView.java). -Normal Keyboard -Emoji Keyboard +Normal Keyboard +Emoji Keyboard +Recent Emojis # Setup **build.gradle** ```groovy -compile 'com.vanniktech:emoji:0.1.0' +compile 'com.vanniktech:emoji:0.2.0' compile 'com.vanniktech:emoji:0.2.0-SNAPSHOT' ``` @@ -23,6 +24,8 @@ Modules are located on [Maven Central](https://oss.sonatype.org/#nexus-search;ga # Example +Declare your [`EmojiEditText`](library/src/main/java/com/vanniktech/emoji/EmojiEditText.java) in your layout xml file. + ```xml ``` +To open the [`EmojiPopup`](library/src/main/java/com/vanniktech/emoji/EmojiPopup.java) execute the code above: + ```java final EmojiPopup emojiPopup = EmojiPopup.Builder.fromRootView(rootView).build(emojiEditText); emojiPopup.toggle(); // Toggles visibility of the Popup @@ -44,9 +49,20 @@ emojiPopup.isShowing(); // Returns true when Popup is showing The `rootView` is the rootView of your layout xml file which will be used for calculating the height of the keyboard. `emojiEditText` is the [`EmojiEditText`](library/src/main/java/com/vanniktech/emoji/EmojiEditText.java) that you declared in your layout xml file. +## Displaying Emojis + +```xml + +``` + +Just use the [`EmojiTextView`](library/src/main/java/com/vanniktech/emoji/EmojiTextView.java) and call `setText` with the String you got from [`EmojiEditText`](library/src/main/java/com/vanniktech/emoji/EmojiEditText.java) and you're done. + ## Listeners -On the builder for the `EmojiPopup` you are able to declare several listeners. +On the builder for the [`EmojiPopup`](library/src/main/java/com/vanniktech/emoji/EmojiPopup.java) you are able to declare several listeners. ```java setOnSoftKeyboardCloseListener(final OnSoftKeyboardCloseListener listener); @@ -57,16 +73,16 @@ setOnEmojiPopupDismissListener(final OnEmojiPopupDismissListener listener); setOnEmojiBackspaceClickListener(final OnEmojiBackspaceClickListener listener); ``` -## Displaying Emojis -```xml - +### Custom recent Emoji implementation + +You can pass your own implementation of the recent Emojis. Just let one of your classes implement the [`RecentEmoji`](library/src/main/java/com/vanniktech/emoji/RecentEmoji.java) interface and pass it when you're building the [`EmojiPopup`](library/src/main/java/com/vanniktech/emoji/EmojiPopup.java): + +```java +setRecentEmoji(yourClassThatImplementsRecentEmoji) ``` -Just use the [`EmojiTextView`](library/src/main/java/com/vanniktech/emoji/EmojiTextView.java) and call `setText` with the String you got from [`EmojiEditText`](library/src/main/java/com/vanniktech/emoji/EmojiEditText.java) and you're done. +If no instance or a null instance is set the default implementation will be used. Check out the sample project to get more information. diff --git a/gradle.properties b/gradle.properties index 300fc8f895..c8e03bd0e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.vanniktech -VERSION_NAME=0.2.0-SNAPSHOT +VERSION_NAME=0.2.0 VERSION_CODE=2 POM_DESCRIPTION=A simple library to add Emoji support to your Android Application diff --git a/preview_1.png b/preview_1.png index 14108c5e56..1d94781df1 100644 Binary files a/preview_1.png and b/preview_1.png differ diff --git a/preview_2.png b/preview_2.png index f1cea7674a..e7784de649 100644 Binary files a/preview_2.png and b/preview_2.png differ diff --git a/preview_3.png b/preview_3.png new file mode 100644 index 0000000000..e2065e69ff Binary files /dev/null and b/preview_3.png differ