Giter VIP home page Giter VIP logo

easyemoji's Introduction

EasyEmoji

Add emoji so easy

让你的App添加表情最简单,最快速,并且无需更改原有activity布局。

可自由扩展面板功能:

可自由扩展emoji表情功能:

Download

Gradle:

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

Step 2. Add the dependency

    dependencies {
            compile 'com.github.nickyangjun:EasyEmoji:1.3.6'
    }

Or Maven:

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <dependency>
        <groupId>com.github.nickyangjun</groupId>
        <artifactId>EasyEmoji</artifactId>
        <version>1.3.6</version>
    </dependency>

How do I use Glide?

Step 1. Replace you editText and TextView to support the emoji

使用EmojiconEditText和EmojiconTextView替换原有布局中的EditText和TextView,以支持emoji表情

EmojiconEditText:

        <org.nicky.libeasyemoji.emojicon.EmojiconEditText 
            xmlns:Emojicon="http://schemas.android.com/apk/res-auto"
            android:id="@+id/emoji_input_txt"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="35dp"
            android:layout_marginRight="100dp"
            android:background="@drawable/shape_input_text"
            android:hint="说点什么吧~"
            android:lineSpacingExtra="1dp"
            android:maxLength="140"
            android:maxLines="4"
            android:minHeight="35dp"
            android:paddingLeft="10dp"
            android:paddingRight="10dp"
            android:textColor="@color/black"
            android:textColorHint="@color/hint_gray_999"
            android:textSize="14sp"
            Emojicon:emojiconSize="18sp" />

EmojiconTextView:

        <org.nicky.libeasyemoji.emojicon.EmojiconTextView
            android:id="@+id/emoji_txt"
            android:layout_width="match_parent"
            android:layout_height="50dp" />

Step 2. Get EasyInputManager instance and add default Emoji in your activity,now joyful.

在activity里获取EasyInputManager实例并且添加默认支持的emoji,现在你可以愉快使用emoji啦

    mEasyInputManager = EasyInputManagerImpl.newInstance(this);
    mEasyInputManager.addDefaultEmoji("emoji",emojiconEditText);


More features can refer to the demo.

Add Panel and Keyboard listener 增加panel和键盘弹出监听

mEasyInputManager.addOnPanelListener(new changePanelListener());
mEasyInputManager.addOnKeyboardIMEListener(new changeKeyboardListener());

Touch blank erea to display keyboard 点击空白区域自动隐藏键盘

mEasyInputManager.setTouchBlankAutoHideIME(true,dip2px(this, 50));

Add custom fragment to panel area 增加自定义界面到panel区域

mEasyInputManager.addFragmentToPanel("attach", AttachFragment.newInstance());

//open panel
mEasyInputManager.openPanel();
//open "attach" panel
mEasyInputManager.openPanel("attach");

//close panel
mEasyInputManager.closePanel();

Add custom expressions 增加自定义表情

//add
mEasyInputManager.getEmojiBuilder().addEmojiStyle(lovedEmoji);
 
//update
mEasyInputManager.getEmojiBuilder().updateEmojiStyle(lovedEmoji);

为了更好的完善此框架,希望更多对此框架有兴趣的朋友一起加入进来打造更易用更完善的EasyEmoji,欢迎star!!!

easyemoji's People

Contributors

nickyangjun avatar

Stargazers

 avatar 何为忧伤 avatar  avatar puyf avatar  avatar  avatar

Watchers

 avatar

easyemoji's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.