Introduction

Makemoji reactions allow you to add inline emoji reactions to any view. This is a great component for getting quick user feedback on any type of content. It uses our emoji wall to let the user react with any emoji you have in your library.


Setup

To include a horizontal view of emoji reactions for a piece of content, include a ReactionsLayout with a given height, like 30dp.

    <com.makemoji.mojilib.ReactionsLayout
        android:id="@+id/reactions_layout"
        android:layout_width="match_parent"
        android:layout_height="30dp"/>

You must set an id corresponding to a unique piece of your content on each reaction layout, using reactionsLayout.setReactionsData(new ReactionData(id)); Make sure to hold onto this data object if you wish to assign it to a view again, such as in a list adapter.

Each ReactionsLayout has an 'add' button that will open the MojiWallActivity for the user to select one, so make sure to add it to your manifest as described above. To update the ReactionsLayout with the user selection, add the following in your onActivityResult.

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        ReactionsData.onActivityResult(requestCode,resultCode,data);
    }