Back to project page EmojiEverywhere.
The source code is released under:
GNU General Public License
If you think the Android project EmojiEverywhere listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package emojicon; //from w ww . ja va2 s. c om import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import emoji.sithagi.com.emojieverywhere.R; import emojicon.emoji.Emojicon; /** * @author Chathura Wijesinghe (cdanasiri@gmail.com) */ class EmojiAdapter extends ArrayAdapter<Emojicon> { public EmojiAdapter(Context context, Emojicon[] data) { super(context, R.layout.emojicon_item, data); } @Override public View getView(int position, View convertView, ViewGroup parent) { View v = convertView; if (v == null) { v = View.inflate(getContext(), R.layout.emojicon_item, null); ViewHolder holder = new ViewHolder(); holder.icon = (TextView) v.findViewById(R.id.emojicon_icon); v.setTag(holder); } Emojicon emoji = getItem(position); ViewHolder holder = (ViewHolder) v.getTag(); holder.icon.setText(emoji.getEmoji()); return v; } class ViewHolder { TextView icon; } }