Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency:
dependencies {
compile 'com.github.apradanas:prismoji-android:1.1.0'
}
Install the provider. Preverably in Application class.
PrismojiManager.install(new PrismojiOneProvider());
<com.apradanas.prismoji.PrismojiTextView
android:id="@+id/prismojiTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:emojiSize="26sp" />
Call prismojiTextView.setText
with the String that contains Unicode encoded Emoji
<com.apradanas.prismoji.PrismojiEditText
android:id="@+id/prismojiEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:emojiSize="26sp" />
To open PrismojiPopup
:
PrismojiPopup prismojiPopup = PrismojiPopup.Builder
.fromRootView(rootView)
.setOnSoftKeyboardCloseListener(new OnSoftKeyboardCloseListener() {
@Override
public void onKeyboardClose() {
prismojiPopup.dismiss();
}
})
.into(prismojiEditText)
.build();
prismojiPopup.toggle(); // toggle popup visibility
prismojiPopup.dismiss(); // dismiss the popup
prismojiPopup.isShowing() // return true when the popup is showing
No configuration needed.