-
Notifications
You must be signed in to change notification settings - Fork 40
Developing
Edgar Fernandes edited this page Aug 25, 2020
·
2 revisions
repositories {
maven {
url "https://jitpack.io"
}
}
implementation 'com.github.edsilfer:emoji-keyboard:1.0.0'
An API that provides access to the raw keyboard layout - in case the developer needs to take control of it. To use it add the snippet below to your layout.xml file:
<br.com.edsilfer.view.EmojiKeyboardLayout
android:layout_width="match_parent"
android:layout_height="263dip"/>
P.S.: 263dip is the height for the soft keyboard with suggestions bar
In order to receive callbacks from the layout, you need to subscribe for it in an instance of EmojiEditText
. Below is a code sample that shows how to do it:
<br.com.edsilfer.view.EmojiEditText
android:id="@+id/input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Message"
android:singleLine="true"
android:textColor="@color/rsc_bottom_panel_accent"
android:textSize="18dip"
android:theme="@style/TelegramEditText"
app:emojiSize="25dip"/>
// your activity should descent of EmojiCompatActivity
prepareKeyboard(EmojiCompatActivity activity, EmojiEditText input)
The panel component provides an implementation of the bottom panel of the application:
- Add the below snippet to your layout.xml file:
<br.com.edsilfer.view.Panel
android:id="@+id/bottompanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"/>
- Make the parent activity descent from
EmojiCompatActivity
; - Implement the interface
PanelEventListener
; - For further details see the
demo
project;