public class ConversationFragment extends Fragment implements OnRefreshListener, android.view.View.OnClickListener, OnLoadMoreListener, IViewProviderListener<UiMessage>
Modifier and Type | Field and Description |
---|---|
protected MessageListAdapter |
mAdapter |
protected LinearLayoutManager |
mLinearLayoutManager |
protected RecyclerView |
mList |
protected MessageViewModel |
mMessageViewModel |
protected android.widget.TextView |
mNewMessageNum |
protected SmartRefreshLayout |
mRefreshLayout |
protected RongExtension |
mRongExtension |
protected RongExtensionViewModel |
mRongExtensionViewModel |
protected android.widget.TextView |
mUnreadHistoryMessageNum |
protected android.widget.TextView |
mUnreadMentionMessageNum |
static int |
REQUEST_CODE_FORWARD
开启合并转发的选择会话界面
|
Constructor and Description |
---|
ConversationFragment() |
Modifier and Type | Method and Description |
---|---|
void |
addFooterView(android.view.View view) |
void |
addHeaderView(android.view.View view) |
android.widget.LinearLayout |
getNotificationContainer()
获取顶部通知栏容器
|
RongExtension |
getRongExtension() |
void |
hideNotificationView(android.view.View notificationView)
隐藏调用showNotificationView所显示的通知view
|
void |
initConversation(java.lang.String targetId,
Conversation.ConversationType conversationType,
android.os.Bundle bundle) |
void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data) |
boolean |
onBackPressed() |
void |
onClick(android.view.View v) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
findId,绑定监听
|
void |
onDestroyView() |
void |
onLoadMore(RefreshLayout refreshLayout) |
void |
onPause() |
void |
onRefresh(RefreshLayout refreshLayout) |
void |
onRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults) |
protected MessageListAdapter |
onResolveAdapter()
获取 adapter.
|
void |
onResume() |
void |
onStop() |
void |
onViewClick(int clickType,
UiMessage data) |
void |
onViewCreated(android.view.View view,
android.os.Bundle savedInstanceState) |
boolean |
onViewLongClick(int clickType,
UiMessage data) |
void |
onWarningDialog(java.lang.String msg)
提示dialog.
|
void |
setEmptyView(int emptyId) |
void |
setEmptyView(android.view.View view) |
void |
showNotificationView(android.view.View notificationView)
在通知区域显示一个view
|
protected SmartRefreshLayout mRefreshLayout
protected RecyclerView mList
protected LinearLayoutManager mLinearLayoutManager
protected MessageListAdapter mAdapter
protected MessageViewModel mMessageViewModel
protected RongExtensionViewModel mRongExtensionViewModel
protected RongExtension mRongExtension
protected android.widget.TextView mNewMessageNum
protected android.widget.TextView mUnreadHistoryMessageNum
protected android.widget.TextView mUnreadMentionMessageNum
public static final int REQUEST_CODE_FORWARD
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
public void onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
public void initConversation(java.lang.String targetId, Conversation.ConversationType conversationType, android.os.Bundle bundle)
public void onResume()
public void onPause()
public void onStop()
public void onDestroyView()
public void onViewClick(int clickType, UiMessage data)
onViewClick
in interface IViewProviderListener<UiMessage>
clickType
- 区分点击事件的标记位data
- 传递的数据源public boolean onViewLongClick(int clickType, UiMessage data)
onViewLongClick
in interface IViewProviderListener<UiMessage>
clickType
- 区分点击事件的标记位data
- 传递的数据源public android.widget.LinearLayout getNotificationContainer()
public void hideNotificationView(android.view.View notificationView)
notificationView
- 通知栏 viewpublic void showNotificationView(android.view.View notificationView)
public boolean onBackPressed()
public void onRefresh(RefreshLayout refreshLayout)
onRefresh
in interface OnRefreshListener
public RongExtension getRongExtension()
public void onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults)
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data)
public void onClick(android.view.View v)
onClick
in interface android.view.View.OnClickListener
public void onLoadMore(RefreshLayout refreshLayout)
onLoadMore
in interface OnLoadMoreListener
public void onWarningDialog(java.lang.String msg)
msg
- dialog 提示protected MessageListAdapter onResolveAdapter()
public void addHeaderView(android.view.View view)
view
- 自定义列表 header viewpublic void addFooterView(android.view.View view)
view
- 自定义列表 footer viewpublic void setEmptyView(android.view.View view)
view
- 自定义列表 空数据 viewpublic void setEmptyView(int emptyId)
emptyId
- 自定义列表 空数据的 LayoutId