• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Emojicon类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.rockerhieu.emojicon.emoji.Emojicon的典型用法代码示例。如果您正苦于以下问题:Java Emojicon类的具体用法?Java Emojicon怎么用?Java Emojicon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Emojicon类属于com.rockerhieu.emojicon.emoji包,在下文中一共展示了Emojicon类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: add

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void add(int index, Emojicon object) {
    super.add(index, object);

    if (index == 0) {
        while (this.size() > EmojiconRecentsManager.maximumSize) {
            super.remove(EmojiconRecentsManager.maximumSize);
        }
    } else {
        while (this.size() > EmojiconRecentsManager.maximumSize) {
            super.remove(0);
        }
    }

    saveRecents();
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:17,代码来源:EmojiconRecentsManager.java


示例2: onViewCreated

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    GridView gridView = (GridView) view.findViewById(R.id.Emoji_GridView);
    Bundle bundle = getArguments();
    if (bundle == null) {
        mData = People.DATA;
        mUseSystemDefault = false;
    } else {
        Parcelable[] parcels = bundle.getParcelableArray(EMOJICONS_KEY);
        mData = new Emojicon[parcels.length];
        for (int i = 0; i < parcels.length; i++) {
            mData[i] = (Emojicon) parcels[i];
        }
        mUseSystemDefault = bundle.getBoolean(USE_SYSTEM_DEFAULT_KEY);
    }
    gridView.setAdapter(new EmojiAdapter(view.getContext(), mData, mUseSystemDefault));
    gridView.setOnItemClickListener(this);
}
 
开发者ID:mobilemaster128,项目名称:emoticon-keyboard,代码行数:19,代码来源:EmojiconGridFragment.java


示例3: addRecentEmoji

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void addRecentEmoji(Context context, Emojicon emojicon) {
    EmojiconRecentsManager recents = EmojiconRecentsManager
        .getInstance(context);
    recents.push(emojicon);

    // notify dataset changed
    if (mAdapter != null)
        mAdapter.notifyDataSetChanged();
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:11,代码来源:EmojiconRecentsGridFragment.java


示例4: push

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
public void push(Emojicon object) {
    // FIXME totally inefficient way of adding the emoji to the adapter
    // TODO this should be probably replaced by a deque
    if (contains(object)) {
        super.remove(object);
    }
    add(0, object);
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:9,代码来源:EmojiconRecentsManager.java


示例5: loadRecents

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
private void loadRecents() {
    SharedPreferences prefs = getPreferences();
    String str = prefs.getString(PREF_RECENTS, "");
    StringTokenizer tokenizer = new StringTokenizer(str, EmojiconRecentsManager.DELIMITER);
    while (tokenizer.hasMoreTokens()) {
        add(Emojicon.fromChars(tokenizer.nextToken()));
    }
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:9,代码来源:EmojiconRecentsManager.java


示例6: saveRecents

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
private void saveRecents() {
    StringBuilder str = new StringBuilder();
    int c = size();
    for (int i = 0; i < c; i++) {
        Emojicon e = get(i);
        str.append(e.getEmoji());
        if (i < (c - 1)) {
            str.append(EmojiconRecentsManager.DELIMITER);
        }
    }
    SharedPreferences prefs = getPreferences();
    prefs.edit().putString(PREF_RECENTS, str.toString()).commit();
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:14,代码来源:EmojiconRecentsManager.java


示例7: newInstance

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
protected static EmojiconGridFragment newInstance(Emojicon[] emojicons, EmojiconRecents recents, boolean useSystemDefault) {
    EmojiconGridFragment emojiGridFragment = new EmojiconGridFragment();
    Bundle args = new Bundle();
    args.putSerializable("emojicons", emojicons);
    args.putBoolean(USE_SYSTEM_DEFAULT_KEY, useSystemDefault);
    emojiGridFragment.setArguments(args);
    emojiGridFragment.setRecents(recents);
    return emojiGridFragment;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:10,代码来源:EmojiconGridFragment.java


示例8: onViewCreated

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    GridView gridView = (GridView) view.findViewById(R.id.Emoji_GridView);
    Bundle bundle = getArguments();
    if (bundle == null) {
        mData = People.DATA;
        mUseSystemDefault = false;
    } else {
        Object[] o = (Object[]) getArguments().getSerializable("emojicons");
        mData = Arrays.asList(o).toArray(new Emojicon[o.length]);
        mUseSystemDefault = bundle.getBoolean(USE_SYSTEM_DEFAULT_KEY);
    }
    gridView.setAdapter(new EmojiAdapter(view.getContext(), mData, mUseSystemDefault));
    gridView.setOnItemClickListener(this);
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:16,代码来源:EmojiconGridFragment.java


示例9: onItemClick

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    if (mOnEmojiconClickedListener != null) {
        mOnEmojiconClickedListener.onEmojiconClicked((Emojicon) parent.getItemAtPosition(position));
    }
    if (mRecents != null) {
        mRecents.addRecentEmoji(view.getContext(), ((Emojicon) parent
            .getItemAtPosition(position)));
    }
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:11,代码来源:EmojiconGridFragment.java


示例10: addRecentEmoji

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void addRecentEmoji(Context context, Emojicon emojicon) {
    EmojiconRecentsManager recents = EmojiconRecentsManager
            .getInstance(context);
    recents.push(emojicon);

    // notify dataset changed
    if (mAdapter != null)
        mAdapter.notifyDataSetChanged();
}
 
开发者ID:mobilemaster128,项目名称:emoticon-keyboard,代码行数:11,代码来源:EmojiconRecentsGridFragment.java


示例11: newInstance

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
protected static EmojiconGridFragment newInstance(Emojicon[] emojicons, EmojiconRecents recents, boolean useSystemDefault) {
    EmojiconGridFragment emojiGridFragment = new EmojiconGridFragment();
    Bundle args = new Bundle();
    args.putParcelableArray(EMOJICONS_KEY, emojicons);
    args.putBoolean(USE_SYSTEM_DEFAULT_KEY, useSystemDefault);
    emojiGridFragment.setArguments(args);
    emojiGridFragment.setRecents(recents);
    return emojiGridFragment;
}
 
开发者ID:mobilemaster128,项目名称:emoticon-keyboard,代码行数:10,代码来源:EmojiconGridFragment.java


示例12: onItemClick

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
    if (mOnEmojiconClickedListener != null) {
        mOnEmojiconClickedListener.onEmojiconClicked((Emojicon) parent.getItemAtPosition(position));
    }
    if (mRecents != null) {
        mRecents.addRecentEmoji(view.getContext(), ((Emojicon) parent
                .getItemAtPosition(position)));
    }
}
 
开发者ID:mobilemaster128,项目名称:emoticon-keyboard,代码行数:11,代码来源:EmojiconGridFragment.java


示例13: input

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
public static void input(EditText editText, Emojicon emojicon) {
    if (editText == null || emojicon == null) {
        return;
    }

    int start = editText.getSelectionStart();
    int end = editText.getSelectionEnd();
    if (start < 0) {
        editText.append(emojicon.getEmoji());
    } else {
        editText.getText().replace(Math.min(start, end), Math.max(start, end), emojicon.getEmoji(), 0, emojicon.getEmoji().length());
    }
}
 
开发者ID:mobilemaster128,项目名称:emoticon-keyboard,代码行数:14,代码来源:EmojiconsFragment.java


示例14: onEmojiconClicked

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onEmojiconClicked(Emojicon emojicon)
{
	int currentPos = mTabLayout.getSelectedTabPosition();
	if (currentPos == POS_CONDITION) return;
	WriteMessageFragment fragment = (WriteMessageFragment) mFragments.get(currentPos);
	fragment.setContent(emojicon.getEmoji());
}
 
开发者ID:ChenAt,项目名称:PlayTogether,代码行数:9,代码来源:PostInvitationActivity.java


示例15: onEmojiconClicked

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onEmojiconClicked(Emojicon emojicon)
{
	String currContent = mEtContent.getText().toString();
	mEtContent.setText(currContent + emojicon.getEmoji());
	mEtContent.setSelection(mEtContent.getText().toString().length());
}
 
开发者ID:ChenAt,项目名称:PlayTogether,代码行数:8,代码来源:ChatActivity.java


示例16: newInstance

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
protected static EmojiconGridFragment newInstance(Emojicon[] emojicons) {
    EmojiconGridFragment emojiGridFragment = new EmojiconGridFragment();
    Bundle args = new Bundle();
    args.putSerializable("emojicons", emojicons);
    emojiGridFragment.setArguments(args);
    return emojiGridFragment;
}
 
开发者ID:XuXuebin,项目名称:com.rockerhieu.emojicon.library,代码行数:8,代码来源:EmojiconGridFragment.java


示例17: onViewCreated

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    GridView gridView = (GridView) view.findViewById(R.id.Emoji_GridView);
    mData = getArguments() == null ? People.DATA : (Emojicon[]) getArguments().getSerializable("emojicons");
    gridView.setAdapter(new EmojiAdapter(view.getContext(), mData));
    gridView.setOnItemClickListener(this);
}
 
开发者ID:XuXuebin,项目名称:com.rockerhieu.emojicon.library,代码行数:9,代码来源:EmojiconGridFragment.java


示例18: onEmojiconClicked

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onEmojiconClicked(Emojicon emojicon) {
    EmojiconsFragment.input(editEmojicon, emojicon);
}
 
开发者ID:jiangzehui,项目名称:xmpp,代码行数:5,代码来源:ChatActivity.java


示例19: onEmojiconClicked

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
@Override
public void onEmojiconClicked(Emojicon emojicon) {
    EmojiconsFragment.input(etMessage, emojicon);
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:5,代码来源:ChatActivity.java


示例20: EmojiAdapter

import com.rockerhieu.emojicon.emoji.Emojicon; //导入依赖的package包/类
public EmojiAdapter(Context context, List<Emojicon> data) {
    super(context, R.layout.emojicon_item, data);
    mUseSystemDefault = false;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:5,代码来源:EmojiAdapter.java



注:本文中的com.rockerhieu.emojicon.emoji.Emojicon类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Feature类代码示例发布时间:2022-05-22
下一篇:
Java RDFReader类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap