本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例11: getType
import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
public EaseEmojicon.Type getType() {
return type;
}
示例12: setType
import com.easemob.easeui.domain.EaseEmojicon.Type; //导入依赖的package包/类
public void setType(EaseEmojicon.Type type) {
this.type = type;
}
示例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;
}