public class IMConversationListUI
extends BaseAdvice
Constructor and Description |
---|
IMConversationListUI(Pointcut pointcut) |
Modifier and Type | Method and Description |
---|---|
boolean |
enableSearchConversations(Fragment fragment)
定制会话列表页面是否需要会话搜索栏及其功能,默认关闭搜索会话功能
|
int |
getCustomBackgroundResId()
自定义会话列表页面背景
|
View |
getCustomConversationListTitle(Fragment fragment,
Context context,
LayoutInflater inflater)
自定义会话列表标题栏
|
View |
getCustomEmptyViewInConversationUI(Context context)
自定义会话列表空白页面,即最近会话个数为0时的页面
|
View |
getCustomItemView(Fragment fragment,
YWConversation conversation,
View convertView,
int viewType,
YWContactHeadLoadHelper headLoadHelper,
ViewGroup parent)
根据viewType获取自定义view
|
int |
getCustomItemViewType(YWConversation conversation)
当前消息对应的自定义view类型
|
int |
getCustomItemViewTypeCount()
自定义消息view种类数
|
java.lang.String |
getCustomTopConversationColor()
返回自定义置顶回话的背景色
|
View |
getCustomView(Context context,
YWConversation conversation,
View convertView,
ViewGroup parent)
返回自定义会话节点view
|
boolean |
getPullToRefreshEnabled()
是否开启下拉刷新功能,默认开启
|
int |
getTribeConversationHead(Fragment fragment,
YWConversation conversation)
自定义群会话的头像
|
boolean |
needHideNullNetWarn(Fragment fragment)
是否隐藏无网络提醒View
|
boolean |
needHideTitleView(Fragment fragment)
是否隐藏会话列表标题栏
|
void |
onActivityCreated(Bundle savedInstanceState,
Fragment fragment) |
void |
onDestroy(Fragment fragment) |
void |
onResume(Fragment fragment) |
void |
setCustomTitleProgressBar(Fragment fragment,
View mCustomTitleView,
boolean isVisible)
通知调用方 消息接收的状态 (可选 )
可以通过 fragment.getActivity() 拿到Context
|
public int getTribeConversationHead(Fragment fragment, YWConversation conversation)
fragment
- 会话列表fragmentconversation
- 群会话public View getCustomConversationListTitle(Fragment fragment, Context context, LayoutInflater inflater)
fragment
- 会话列表fragmentcontext
- 会话列表页面的contextinflater
- LayoutInflater实例public void setCustomTitleProgressBar(Fragment fragment, View mCustomTitleView, boolean isVisible)
mCustomTitleView
- 用户设置的自定义标题 ViewisVisible
- 是否显示“正在接收消息中” true:调用方需要去显示“消息接收中的菊花” false:调方用需要隐藏“消息接收中的菊花”public boolean needHideTitleView(Fragment fragment)
fragment
- 会话列表fragmentpublic boolean needHideNullNetWarn(Fragment fragment)
fragment
- 会话列表fragmentpublic java.lang.String getCustomTopConversationColor()
public boolean enableSearchConversations(Fragment fragment)
fragment
- public View getCustomView(Context context, YWConversation conversation, View convertView, ViewGroup parent)
context
- context上下文conversation
- 自定义View的会话convertView
- 中的convertView
parent
- 中的parent
public View getCustomEmptyViewInConversationUI(Context context)
context
- 会话列表页面contextpublic int getCustomItemViewTypeCount()
public int getCustomItemViewType(YWConversation conversation)
conversation
- 需要自定义显示的会话public View getCustomItemView(Fragment fragment, YWConversation conversation, View convertView, int viewType, YWContactHeadLoadHelper headLoadHelper, ViewGroup parent)
fragment
- 聊天窗口fragmentconversation
- 当前需要自定义view的会话convertView
- 自定义viewviewType
- 自定义view类型headLoadHelper
- 头像加载管理器,用户可以调用该对象的方法加载头像public boolean getPullToRefreshEnabled()
public int getCustomBackgroundResId()
public void onActivityCreated(Bundle savedInstanceState, Fragment fragment)
public void onDestroy(Fragment fragment)
public void onResume(Fragment fragment)