0

I have been struggling with this for far too long. I want to display the nerd face http://emojipedia.org/nerd-face/ but am unsure how to go about it:

This is the current XML I have:

<com.rockerhieu.emojicon.EmojiconTextView
    android:id="@+id/txtEmojicon1"
    android:text=""
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textSize="30dp"
    android:textIsSelectable="true"
    android:layout_centerVertical="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_marginLeft="44dp"
    android:layout_marginStart="44dp" />

I have no idea what to place inside the android:text=""

Everything I place inside of the text="" comes out to not working

1 Answers1

0

UPDATE THIS LIBRARY HAS BEEN DISCONTINUED BY THE OWNER UPDATE

see here : https://github.com/rockerhieu/emojicon

its pretty easy for you to implement any emoji type from Rockerheiu .

1.You will have to add the library as a module unlike adding it via the maven central Repository .

Once you are done adding module

Navigate to the library -> library\src\main\java\io\github\rockerhieu\emojicon\emoji and you edit the People.java File to get started on adding a new emoji code looks like this.

 package io.github.rockerhieu.emojicon.emoji;

 /**
 * @author Hieu Rocker (rockerhieu@gmail.com)
 */
    public class People {
       public static final Emojicon[] DATA = new Emojicon[]{

        Emojicon.fromCodePoint(0x1f604),
        Emojicon.fromCodePoint(0x1f603),
        Emojicon.fromCodePoint(0x1f600),
        Emojicon.fromCodePoint(0x1f60a),
        Emojicon.fromChar((char) 0x263a),
        Emojicon.fromCodePoint(0x1f609),
        Emojicon.fromCodePoint(0x1f60d),
        Emojicon.fromCodePoint(0x1f618),
Barungi Stephen
  • 759
  • 8
  • 13