类 EaseChatHistoryFragment.Builder
- java.lang.Object
-
- io.agora.chat.uikit.chathistory.EaseChatHistoryFragment.Builder
-
public static class EaseChatHistoryFragment.Builder extends java.lang.Object
-
-
字段概要
字段 修饰符和类型 字段 说明 protected android.os.Bundlebundleprotected EaseChatHistoryFragmentcustomFragment
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 EaseChatHistoryFragmentbuild()EaseChatHistoryFragment.BuilderenableHeaderPressBack(boolean canBack)Whether show back icon in titleBarEaseChatHistoryFragment.BuildersetChatBackground(int bgDrawable)Set the background of the chat list regionEaseChatHistoryFragment.BuildersetCombineMessage(io.agora.chat.ChatMessage message)Set the param of combine message.EaseChatHistoryFragment.BuildersetCustomAdapter(EaseMessageAdapter adapter)Set custom adapter which should extends EaseMessageAdapter<T extends EaseChatHistoryFragment>
EaseChatHistoryFragment.BuildersetCustomFragment(T fragment)Set custom fragment which should extends EaseMessageFragmentEaseChatHistoryFragment.BuildersetEmptyLayout(int emptyLayout)Set chat list's empty layout if you want replace the defaultEaseChatHistoryFragment.BuildersetHeaderBackPressListener(EaseTitleBar.OnBackPressListener listener)If you have setenableHeaderPressBack(boolean), you can set the listenerEaseChatHistoryFragment.BuildersetHeaderSubTitle(java.lang.String subTitle)Set titleBar's sub titleEaseChatHistoryFragment.BuildersetHeaderTitle(java.lang.String title)Set titleBar's titleEaseChatHistoryFragment.BuildersetMsgTimeTextColor(int color)Set the text color of message item timeEaseChatHistoryFragment.BuildersetMsgTimeTextSize(int size)Set the text size of message item time, unit is pxEaseChatHistoryFragment.BuildersetOnCombineMessageDownloadAndParseListener(OnCombineMessageDownloadAndParseListener listener)Set combine message download and parse listener.EaseChatHistoryFragment.BuildersetReceivedMsgBubbleBackground(int bgDrawable)Set the bubble background of the received messageEaseChatHistoryFragment.BuildersetSentBubbleBackground(int bgDrawable)Set the bubble background of the sent messageEaseChatHistoryFragment.BuilderuseHeader(boolean useTitle)Whether to use default titleBar which isEaseTitleBar
-
-
-
字段详细资料
-
bundle
protected final android.os.Bundle bundle
-
customFragment
protected EaseChatHistoryFragment customFragment
-
-
方法详细资料
-
setCombineMessage
public EaseChatHistoryFragment.Builder setCombineMessage(io.agora.chat.ChatMessage message)
Set the param of combine message.- 参数:
message-- 返回:
-
useHeader
public EaseChatHistoryFragment.Builder useHeader(boolean useTitle)
Whether to use default titleBar which isEaseTitleBar- 参数:
useTitle-- 返回:
-
setHeaderTitle
public EaseChatHistoryFragment.Builder setHeaderTitle(java.lang.String title)
Set titleBar's title- 参数:
title-- 返回:
-
setHeaderSubTitle
public EaseChatHistoryFragment.Builder setHeaderSubTitle(java.lang.String subTitle)
Set titleBar's sub title- 参数:
subTitle-- 返回:
-
enableHeaderPressBack
public EaseChatHistoryFragment.Builder enableHeaderPressBack(boolean canBack)
Whether show back icon in titleBar- 参数:
canBack-- 返回:
-
setHeaderBackPressListener
public EaseChatHistoryFragment.Builder setHeaderBackPressListener(EaseTitleBar.OnBackPressListener listener)
If you have setenableHeaderPressBack(boolean), you can set the listener- 参数:
listener-- 返回:
-
setMsgTimeTextColor
public EaseChatHistoryFragment.Builder setMsgTimeTextColor(@ColorInt int color)
Set the text color of message item time- 参数:
color-- 返回:
-
setMsgTimeTextSize
public EaseChatHistoryFragment.Builder setMsgTimeTextSize(int size)
Set the text size of message item time, unit is px- 参数:
size-- 返回:
-
setReceivedMsgBubbleBackground
public EaseChatHistoryFragment.Builder setReceivedMsgBubbleBackground(@DrawableRes int bgDrawable)
Set the bubble background of the received message- 参数:
bgDrawable-- 返回:
-
setSentBubbleBackground
public EaseChatHistoryFragment.Builder setSentBubbleBackground(@DrawableRes int bgDrawable)
Set the bubble background of the sent message- 参数:
bgDrawable-- 返回:
-
setChatBackground
public EaseChatHistoryFragment.Builder setChatBackground(@DrawableRes int bgDrawable)
Set the background of the chat list region- 参数:
bgDrawable-- 返回:
-
setEmptyLayout
public EaseChatHistoryFragment.Builder setEmptyLayout(@LayoutRes int emptyLayout)
Set chat list's empty layout if you want replace the default- 参数:
emptyLayout-- 返回:
-
setOnCombineMessageDownloadAndParseListener
public EaseChatHistoryFragment.Builder setOnCombineMessageDownloadAndParseListener(OnCombineMessageDownloadAndParseListener listener)
Set combine message download and parse listener.- 参数:
listener-- 返回:
-
setCustomFragment
public <T extends EaseChatHistoryFragment> EaseChatHistoryFragment.Builder setCustomFragment(T fragment)
Set custom fragment which should extends EaseMessageFragment- 类型参数:
T-- 参数:
fragment-- 返回:
-
setCustomAdapter
public EaseChatHistoryFragment.Builder setCustomAdapter(EaseMessageAdapter adapter)
Set custom adapter which should extends EaseMessageAdapter- 参数:
adapter-- 返回:
-
build
public EaseChatHistoryFragment build()
-
-