Java Code Examples for com.hyphenate.chat.EMMessage#getIntAttribute()

The following examples show how to use com.hyphenate.chat.EMMessage#getIntAttribute() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RightTextMessageItemView.java    From FamilyChat with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isForViewType(EMMessage item, int position)
{
    int attr = item.getIntAttribute(HxMsgAttrConstant.TXT_ATTR_KEY, HxMsgAttrConstant.NORMAL_TEXT_MSG);

    if (item.direct() == EMMessage.Direct.SEND && item.getType() == EMMessage.Type.TXT
            && attr == HxMsgAttrConstant.NORMAL_TEXT_MSG)
        return true;
    else
        return false;
}
 
Example 2
Source File: RightVoiceRecordItemView.java    From FamilyChat with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isForViewType(EMMessage item, int position)
{
    int attr = item.getIntAttribute(HxMsgAttrConstant.TXT_ATTR_KEY, HxMsgAttrConstant.NORMAL_TEXT_MSG);

    if (item.direct() == EMMessage.Direct.SEND && item.getType() == EMMessage.Type.TXT
            && attr == HxMsgAttrConstant.VOICE_CALL_RECORD)
        return true;
    else
        return false;
}
 
Example 3
Source File: LeftTextMessageItemView.java    From FamilyChat with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isForViewType(EMMessage item, int position)
{
    int attr = item.getIntAttribute(HxMsgAttrConstant.TXT_ATTR_KEY, HxMsgAttrConstant.NORMAL_TEXT_MSG);

    if (item.direct() == EMMessage.Direct.RECEIVE && item.getType() == EMMessage.Type.TXT
            && attr == HxMsgAttrConstant.NORMAL_TEXT_MSG)
        return true;
    else
        return false;
}
 
Example 4
Source File: LeftVoiceRecordItemView.java    From FamilyChat with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isForViewType(EMMessage item, int position)
{
    int attr = item.getIntAttribute(HxMsgAttrConstant.TXT_ATTR_KEY, HxMsgAttrConstant.NORMAL_TEXT_MSG);

    if (item.direct() == EMMessage.Direct.RECEIVE && item.getType() == EMMessage.Type.TXT
            && attr == HxMsgAttrConstant.VOICE_CALL_RECORD)
        return true;
    else
        return false;
}
 
Example 5
Source File: LeftVideoRecordItemView.java    From FamilyChat with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isForViewType(EMMessage item, int position)
{
    int attr = item.getIntAttribute(HxMsgAttrConstant.TXT_ATTR_KEY, HxMsgAttrConstant.NORMAL_TEXT_MSG);

    if (item.direct() == EMMessage.Direct.RECEIVE && item.getType() == EMMessage.Type.TXT
            && attr == HxMsgAttrConstant.VIDEO_CALL_RECORD)
        return true;
    else
        return false;
}
 
Example 6
Source File: RightVideoRecordItemView.java    From FamilyChat with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isForViewType(EMMessage item, int position)
{
    int attr = item.getIntAttribute(HxMsgAttrConstant.TXT_ATTR_KEY, HxMsgAttrConstant.NORMAL_TEXT_MSG);

    if (item.direct() == EMMessage.Direct.SEND && item.getType() == EMMessage.Type.TXT
            && attr == HxMsgAttrConstant.VIDEO_CALL_RECORD)
        return true;
    else
        return false;
}