当前位置: 首页>>代码示例>>Java>>正文


Java Type类代码示例

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


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

示例1: createData

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
private static EaseEmojiconGroupEntity createData(){
    EaseEmojiconGroupEntity emojiconGroupEntity = new EaseEmojiconGroupEntity();
    EaseEmojicon[] datas = new EaseEmojicon[icons.length];
    for(int i = 0; i < icons.length; i++){
        datas[i] = new EaseEmojicon(icons[i], null, Type.BIG_EXPRESSION);
        datas[i].setBigIcon(bigIcons[i]);
        datas[i].setName("示例"+ (i+1));
        datas[i].setIdentityCode("em"+ (1000+i+1));
    }
    emojiconGroupEntity.setEmojiconList(Arrays.asList(datas));
    emojiconGroupEntity.setIcon(R.drawable.ee_2);
    emojiconGroupEntity.setType(Type.BIG_EXPRESSION);
    return emojiconGroupEntity;
}
 
开发者ID:easemob,项目名称:sdkdemoapp3.0_android,代码行数:15,代码来源:EmojiconExampleGroupData.java

示例2: createData

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
private static EaseEmojicon[] createData(){
    EaseEmojicon[] datas = new EaseEmojicon[icons.length];
    for(int i = 0; i < icons.length; i++){
        datas[i] = new EaseEmojicon(icons[i], emojis[i], Type.NORMAL);
    }
    return datas;
}
 
开发者ID:easemob,项目名称:easeui,代码行数:8,代码来源:EaseDefaultEmojiconDatas.java

示例3: getView

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if(convertView == null){
        if(emojiconType == Type.BIG_EXPRESSION){
            convertView = View.inflate(getContext(), R.layout.ease_row_big_expression, null);
        }else{
            convertView = View.inflate(getContext(), R.layout.ease_row_expression, null);
        }
    }
    
    ImageView imageView = (ImageView) convertView.findViewById(R.id.iv_expression);
    TextView textView = (TextView) convertView.findViewById(R.id.tv_name);
    EaseEmojicon emojicon = getItem(position);
    if(textView != null && emojicon.getName() != null){
        textView.setText(emojicon.getName());
    }
    if(EaseSmileUtils.DELETE_KEY.equals(emojicon.getEmojiText())){
        imageView.setImageResource(R.drawable.ease_delete_expression);
    }else{
        if(emojicon.getIcon() != 0){
            imageView.setImageResource(emojicon.getIcon());
        }else if(emojicon.getIconPath() != null){
            Glide.with(getContext()).load(emojicon.getIconPath()).placeholder(R.drawable.ease_default_expression).into(imageView);
        }
    }
    
    
    return convertView;
}
 
开发者ID:easemob,项目名称:easeui,代码行数:30,代码来源:EmojiconGridAdapter.java

示例4: getPageSize

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
/**
 * 获取pager数量
 * @param emojiconList
 * @return
 */
private int getPageSize(EaseEmojiconGroupEntity groupEntity) {
    List<EaseEmojicon> emojiconList = groupEntity.getEmojiconList();
    int itemSize = emojiconColumns * emojiconRows -1;
    int totalSize = emojiconList.size();
    Type emojiType = groupEntity.getType();
    if(emojiType == Type.BIG_EXPRESSION){
        itemSize = bigEmojiconColumns * bigEmojiconRows;
    }
    int pageSize = totalSize % itemSize == 0 ? totalSize/itemSize : totalSize/itemSize + 1;   
    return pageSize;
}
 
开发者ID:easemob,项目名称:easeui,代码行数:17,代码来源:EaseEmojiconPagerView.java

示例5: createData

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
private static EaseEmojiconGroupEntity createData() {
    EaseEmojiconGroupEntity emojiconGroupEntity = new EaseEmojiconGroupEntity();
    EaseEmojicon[] datas = new EaseEmojicon[icons.length];
    for (int i = 0; i < icons.length; i++) {
        datas[i] = new EaseEmojicon(icons[i], null, Type.BIG_EXPRESSION);
        datas[i].setBigIcon(bigIcons[i]);
        datas[i].setName("示例" + (i + 1));
        datas[i].setIdentityCode("em" + (1000 + i + 1));
    }
    emojiconGroupEntity.setEmojiconList(Arrays.asList(datas));
    emojiconGroupEntity.setIcon(R.drawable.ee_2);
    emojiconGroupEntity.setType(Type.BIG_EXPRESSION);
    return emojiconGroupEntity;
}
 
开发者ID:nggirl,项目名称:EaseChatDemo,代码行数:15,代码来源:EmojiconExampleGroupData.java

示例6: createData

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
private static EaseEmojicon[] createData() {
    EaseEmojicon[] datas = new EaseEmojicon[icons.length];
    for (int i = 0; i < icons.length; i++) {
        datas[i] = new EaseEmojicon(icons[i], emojis[i], Type.NORMAL);
    }
    return datas;
}
 
开发者ID:nggirl,项目名称:EaseChatDemo,代码行数:8,代码来源:EaseDefaultEmojiconDatas.java

示例7: getView

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null) {
        if (emojiconType == Type.BIG_EXPRESSION) {
            convertView = View.inflate(getContext(), R.layout.ease_row_big_expression, null);
        } else {
            convertView = View.inflate(getContext(), R.layout.ease_row_expression, null);
        }
    }

    ImageView imageView = (ImageView) convertView.findViewById(R.id.iv_expression);
    TextView textView = (TextView) convertView.findViewById(R.id.tv_name);
    EaseEmojicon emojicon = getItem(position);
    if (textView != null && emojicon.getName() != null) {
        textView.setText(emojicon.getName());
    }
    if (EaseSmileUtils.DELETE_KEY.equals(emojicon.getEmojiText())) {
        imageView.setImageResource(R.drawable.ease_delete_expression);
    } else {
        if (emojicon.getIcon() != 0) {
            imageView.setImageResource(emojicon.getIcon());
        } else if (emojicon.getIconPath() != null) {
            Glide.with(getContext()).load(emojicon.getIconPath()).placeholder(R.drawable.ease_default_expression).into(imageView);
        }
    }


    return convertView;
}
 
开发者ID:nggirl,项目名称:EaseChatDemo,代码行数:30,代码来源:EmojiconGridAdapter.java

示例8: getPageSize

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
/**
 * 获取pager数量
 *
 * @param emojiconList
 * @return
 */
private int getPageSize(EaseEmojiconGroupEntity groupEntity) {
    List<EaseEmojicon> emojiconList = groupEntity.getEmojiconList();
    int itemSize = emojiconColumns * emojiconRows - 1;
    int totalSize = emojiconList.size();
    Type emojiType = groupEntity.getType();
    if (emojiType == Type.BIG_EXPRESSION) {
        itemSize = bigEmojiconColumns * bigEmojiconRows;
    }
    int pageSize = totalSize % itemSize == 0 ? totalSize / itemSize : totalSize / itemSize + 1;
    return pageSize;
}
 
开发者ID:nggirl,项目名称:EaseChatDemo,代码行数:18,代码来源:EaseEmojiconPagerView.java

示例9: EmojiconGridAdapter

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
public EmojiconGridAdapter(Context context, int textViewResourceId, List<EaseEmojicon> objects, EaseEmojicon.Type emojiconType) {
    super(context, textViewResourceId, objects);
    this.emojiconType = emojiconType;
}
 
开发者ID:easemob,项目名称:easeui,代码行数:5,代码来源:EmojiconGridAdapter.java

示例10: EaseEmojiconGroupEntity

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
public EaseEmojiconGroupEntity(int icon, List<EaseEmojicon> emojiconList){
    this.icon = icon;
    this.emojiconList = emojiconList;
    type = Type.NORMAL;
}
 
开发者ID:easemob,项目名称:easeui,代码行数:6,代码来源:EaseEmojiconGroupEntity.java

示例11: getType

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
public EaseEmojicon.Type getType() {
    return type;
}
 
开发者ID:easemob,项目名称:easeui,代码行数:4,代码来源:EaseEmojiconGroupEntity.java

示例12: setType

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
public void setType(EaseEmojicon.Type type) {
    this.type = type;
}
 
开发者ID:easemob,项目名称:easeui,代码行数:4,代码来源:EaseEmojiconGroupEntity.java

示例13: EaseEmojiconGroupEntity

import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
public EaseEmojiconGroupEntity(int icon, List<EaseEmojicon> emojiconList) {
    this.icon = icon;
    this.emojiconList = emojiconList;
    type = Type.NORMAL;
}
 
开发者ID:nggirl,项目名称:EaseChatDemo,代码行数:6,代码来源:EaseEmojiconGroupEntity.java


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