SuperNova-Emoji, 为Android实现和渲染图释的库

分享于 

4分钟阅读

GitHub

  繁體
Very slightly changed from original repo; see below
  • 源代码名称:SuperNova-Emoji
  • 源代码网址:http://www.github.com/hani-momanii/SuperNova-Emoji
  • SuperNova-Emoji源代码文档
  • SuperNova-Emoji源代码下载
  • Git URL:
    git://www.github.com/hani-momanii/SuperNova-Emoji.git
    Git Clone代码到本地:
    git clone http://www.github.com/hani-momanii/SuperNova-Emoji
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/hani-momanii/SuperNova-Emoji
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    

    Android Gems

    Android Arsenalemojicon on Maven CentralAppVeyor branch

    发行说明

    超新星表情符号

    超新星符号是一个实现和渲染表情符号的库。 最小SDK级别:9 ( 2.3 )

    image

    联系人

    alt textalt textalt text

    Java使用

    使用默认颜色:EmojIconActions ( 上下文 ctx,视图 rootView,emojiconEditText emojiconEditText,ImageView emojiButton )

    
    EmojIconActions emojIcon=new EmojIconActions(this,rootView,emojiconEditText,emojiButton);
    
    
    emojIcon.ShowEmojIcon();
    
    
    
    

    image

    要使用自定义颜色:EmojIconActions ( 上下文 ctx,视图 rootView,emojiconEditText emojiconEditText,ImageView emojiButton,字符串 iconPressedColor,字符串 tabsColor,字符串 backgroundColor )

    
    EmojIconActions emojIcon=new EmojIconActions(this,rootView,emojiconEditText,emojiButton,"#495C66","#DCE1E2","#E6EBEF");
    
    
    emojIcon.ShowEmojIcon();
    
    
    
    

    image

    侦听键盘状态的步骤

    
    emojIcon.setKeyboardListener(new EmojIconActions.KeyboardListener() {
    
    
    @Override
    
    
    public void onKeyboardOpen() {
    
    
     Log.e("Keyboard","open");
    
    
     }
    
    
    
    @Override
    
    
    public void onKeyboardClose() {
    
    
     Log.e("Keyboard","close");
    
    
    }
    
    
    });
    
    
    
    

    使用设备默认表情符

    
    emojIcon.setUseSystemEmoji(true);
    
    
    emojiconEditText.setUseSystemEmoji(true);
    
    
    
    

    image

    XML用法

    
    <hani.momanii.supernova_emoji_library.Helper.EmojiconEditText
    
    
     android:id="@+id/emojicon_edit_text"
    
    
     android:layout_width="match_parent"
    
    
     android:layout_height="wrap_content"
    
    
     emojicon:emojiconSize="28sp"/>
    
    
    
    <hani.momanii.supernova_emoji_library.Helper.EmojiconTextView
    
    
     android:id="@+id/emojicon_text_view"
    
    
     android:layout_width="wrap_content"
    
    
     android:layout_height="wrap_content" 
    
    
     emojicon:emojiconSize="28sp"/>
    
    
    
    
    

    用法

    • EmojiconTextView: 可以渲染表情符号的TextView
    • EmojiconEditText: 可以渲染表情符号的EditText
    • EmojiconMultiAutoCompleteTextView: 可以渲染表情符号的MultiAutoCompleteTextView

    IntelliJ的

    通过 Gradle:

    
    
    
    
    repositories {
    
    
     maven { url 'https://jitpack.io' }
    
    
    }
    
    
    compile 'com.github.hani-momanii:SuperNova-Emoji:1.1'
    
    
    
    

    确认

    基于rocker库的Hieu Emojicon。

    Emojicon使用来自 emoji-cheat-sheet.com的表情符号图形。

    许可证

    
    Copyright 2016 Hani Al-Momani
    
    
    
    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.
    
    
    
    

    相关文章