AwesomeKeyboard

Additional

Language
Java
Version
1.0.1 (Jul 22, 2017)
Created
Jul 8, 2017
Updated
Jul 23, 2017
Owner
Hoàng Anh Tuấn (hoanganhtuan95ptit)
Contributor
Hoàng Anh Tuấn (hoanganhtuan95ptit)
1
Activity
Badge
Generate
Download
Source code
APK file

Announcement

AwesomeKeyboard

emojicons, emojicons gif ( like Skype), sticker, photo and color keyboard

I. Demo

apk demo

https://github.com/hoanganhtuan95ptit/AwesomeKeyboard/blob/master/output/app-debug.apk

video demo

https://youtu.be/uiC-cQCVTdo

gif demo

Emojicons Sticker Photo Color Nomal emojicons gif

II. Setting

You need to import module #Core and module #Layout
        repositories {
                ...
                maven { url 'https://jitpack.io' }
        }  
        
        dependencies {
            compile 'com.github.hoanganhtuan95ptit.AwesomeKeyboard:layout:1.0.1'
        }
        

III. Doc

1.Add

  • Application:
     public class App extends Application {

         @Override
         public void onCreate() {
             super.onCreate();
             AwesomeKeyboardSdk.initialize(this, Utils.emoticons);
         }
     }
  • Use:
     private void initKeyboard() {
            keyboard = KeyboardBuilder.with(this)
                    .setRoot(reRoot)
                    .setKeyboardLayout(keyboardLayout)
                    .setOnKeyDownListener(this)
                    .addEditText(editMessage)
                    .builder();
     }
  • EmojiconTextView:
      <com.hoanganhtuan95ptit.awesomekeyboard.core.view.EmojiconTextView
         android:id="@+id/tv"
         android:layout_width="match_parent"
         android:layout_height="wrap_content" />

set text

     EmojiconTextView.setEmojicon("infor");
  • EmojiconEditText:
       <com.hoanganhtuan95ptit.awesomekeyboard.core.view.EmojiconEditText
            android:id="@+id/edit_message"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:hint="Message"
            android:maxHeight="100dp"
            android:minHeight="50dp"
            android:padding="8dp" />

set text

      @Override
     public void onItemEmoticonClicked(String key) {
         int start = editMessage.getSelectionStart();
         int end = editMessage.getSelectionEnd();
         editMessage.getEditableText().replace(start, end, key);
     }
  • Show keyboard

1. show sticker

        keyboard.showKeyboard(AwesomeKeyboardType.STICKER.getValue());

2. show photo

       keyboard.showKeyboard(AwesomeKeyboardType.PHOTO.getValue());

3. show color

        keyboard.showKeyboard(AwesomeKeyboardType.COLOR.getValue());

4. show nomal

         keyboard.showKeyboard(AwesomeKeyboardType.NOMAL.getValue());
  • Hide keyboard
          keyboard.hideAllKeyboard();
  • update Data Emoticon
          keyboardLayout.updateDataEmoticon(emoticonCategories.get(i));
  • update Data Sticker
          keyboardLayout.updateDataSticker(stickerCategories.get(i));
  • update Data Color
          keyboardLayout.updateDataColor("#1ecef3");

IV. Custom UI

1. Intall

You just need to import module #Core

       repositories {
                ...
                maven { url 'https://jitpack.io' }
        }  
         dependencies {
             compile 'com.github.hoanganhtuan95ptit.AwesomeKeyboard:core:1.0.1'
         }

2. Extends KeyboardLayout Tutorial

         public abstract class KeyboardLayout extends RelativeLayout {

             private static final String TAG = "KeyboardLayout";

             public KeyboardLayout(Context context) {
                 super(context);
             }

             public KeyboardLayout(Context context, AttributeSet attrs) {
                 super(context, attrs);
             }

             public KeyboardLayout(Context context, AttributeSet attrs, int defStyleAttr) {
                 super(context, attrs, defStyleAttr);
             }

             public void showKeyboard(int type){
                 // TODO: 7/21/2017 do something 
             }
         }

3. Init data for EmojiconConstant.emoticons Tutorial

        //tutorial
        public class AwesomeKeyboardSdk {

            private AwesomeKeyboardSdk(Context context, HashMap<String, String> emoticons) {
                EmojiconConstant.emoticons = emoticons;
                Fresco.initialize(context);
            }

            private static AwesomeKeyboardSdk awesomeKeyboard;

            public static void initialize(Context context, HashMap<String, String> emoticons) {
                if (awesomeKeyboard == null) awesomeKeyboard = new AwesomeKeyboardSdk(context, emoticons);
            }
        }

V. Thank

Developer Project
Waynejo Android-ndk-gif
Ogaclejapan SmartTabLayout
Wasabeef Blurry

License

Apache Version 2.0
Copyright 2017 HoangAnhTuan95ptit (hoanganhtuan95ptit@gmail.com)

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

 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.