Package ai.nexconn.chatui.channel
Class ChannelFragment
-
- All Implemented Interfaces:
public class ChannelFragment
-
-
Field Summary
Fields Modifier and Type Field Description public final static intREQUEST_CODE_FORWARD
-
Constructor Summary
Constructors Constructor Description ChannelFragment()
-
Method Summary
Modifier and Type Method Description voidinitConversation(String targetId, ChannelType channelType, Bundle bundle)voidonViewClick(int clickType, UiMessage data)booleanonViewLongClick(View view, int clickType, UiMessage data)booleanonViewLongClick(int clickType, UiMessage data)LinearLayoutgetNotificationContainer()Returns the top notification bar container. voidhideNotificationView(View notificationView)Hides the notification view previously shown by showNotificationView. voidshowNotificationView(View notificationView)Displays a view in the notification area. booleanonBackPressed()voidonRefresh(RefreshLayout refreshLayout)RongExtensiongetRongExtension()voidonActivityResult(int requestCode, int resultCode, Intent data)voidonRequestPermissionsResult(int requestCode, Array<String> permissions, Array<int> grantResults)ViewonCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)Find views by ID and bindlisteners. voidonViewCreated(View view, Bundle savedInstanceState)voidonResume()voidonPause()voidonStart()voidonStop()voidonDestroyView()voidonClick(View v)voidonLoadMore(RefreshLayout refreshLayout)voidonWarningDialog(String msg)Warning dialog, e.g. voidaddHeaderView(View view)voidaddFooterView(View view)voidsetEmptyView(View view)voidsetEmptyView(int emptyId)-
-
Method Detail
-
initConversation
void initConversation(String targetId, ChannelType channelType, Bundle bundle)
-
onViewClick
void onViewClick(int clickType, UiMessage data)
-
onViewLongClick
boolean onViewLongClick(View view, int clickType, UiMessage data)
-
onViewLongClick
boolean onViewLongClick(int clickType, UiMessage data)
-
getNotificationContainer
LinearLayout getNotificationContainer()
Returns the top notification bar container.
- Returns:
the notification container
-
hideNotificationView
void hideNotificationView(View notificationView)
Hides the notification view previously shown by showNotificationView.
- Parameters:
notificationView- the notification view to hide
-
showNotificationView
void showNotificationView(View notificationView)
Displays a view in the notification area.
-
onBackPressed
boolean onBackPressed()
-
onRefresh
void onRefresh(RefreshLayout refreshLayout)
-
getRongExtension
RongExtension getRongExtension()
-
onActivityResult
void onActivityResult(int requestCode, int resultCode, Intent data)
-
onRequestPermissionsResult
void onRequestPermissionsResult(int requestCode, Array<String> permissions, Array<int> grantResults)
-
onCreateView
View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Find views by ID and bindlisteners.
-
onViewCreated
void onViewCreated(View view, Bundle savedInstanceState)
-
onResume
void onResume()
-
onPause
void onPause()
-
onStart
void onStart()
-
onStop
void onStop()
-
onDestroyView
void onDestroyView()
-
onClick
void onClick(View v)
-
onLoadMore
void onLoadMore(RefreshLayout refreshLayout)
-
onWarningDialog
void onWarningDialog(String msg)
Warning dialog, e.g. "Failed to join chatroom". To customize: 1. Create a subclass of ChannelFragment. 2. Override onWarningDialog.
- Parameters:
msg- the dialog message
-
addHeaderView
void addHeaderView(View view)
- Parameters:
view- custom list header view
-
addFooterView
void addFooterView(View view)
- Parameters:
view- custom list footer view
-
setEmptyView
void setEmptyView(View view)
- Parameters:
view- custom empty-state view for the list
-
setEmptyView
void setEmptyView(int emptyId)
- Parameters:
emptyId- layout resource ID for the custom empty-state view
-
-
-
-