diff --git a/ReactNative/README.md b/ReactNative/README.md index d5655546..e1f8ce81 100644 --- a/ReactNative/README.md +++ b/ReactNative/README.md @@ -237,13 +237,18 @@ AuroraIMUIModule.insertMessagesToTop(messages); **In android, if your want to define your chatting bubble, you need to put a drawable file in drawable folder, and that image file must be [nine patch drawable file](https://developer.android.com/reference/android/graphics/drawable/NinePatchDrawable.html), see our example for detail.** -- sendBubble: PropTypes.string -- The name of the nine patch file. - -same to top +- sendBubble: PropTypes.object : +``` +// eg: + { + imageName:"inComing_bubble", + padding:{left:10,top:10,right:15,bottom:10} + } +``` -- receiveBubble: PropTypes.string, (Android Only) +- receiveBubble: PropTypes.object, -- sendBubbleTextColor: PropTypes.string, (Android Only) +- sendBubbleTextColor: PropTypes.string, - receiveBubbleTextColor: PropTypes.string, @@ -252,8 +257,16 @@ same to top - receiveBubbleTextSize: PropTypes.number, -This Padding object includes four properties: left, top, right, bottom. eg: {left 5, top: 5, right: 15, bottom: 5} - +This Padding object includes four properties: left, top, right, bottom. +``` + // eg: + { + left: 5, + top: 5, + right: 15, + bottom: 5 + } +``` - sendBubblePadding: PropTypes.object - receiveBubblePadding: PropTypes.object diff --git a/ReactNative/README_zh.md b/ReactNative/README_zh.md index a9c4a9fa..cff83bde 100644 --- a/ReactNative/README_zh.md +++ b/ReactNative/README_zh.md @@ -244,10 +244,16 @@ AuroraIMUIModule.insertMessagesToTop(messages); ### MessageList 自定义样式 **在 Android 中,如果你想要自定义消息气泡,你需要将一张点九图放在 drawable 文件夹下。 [点九图介绍](https://developer.android.com/reference/android/graphics/drawable/NinePatchDrawable.html),详情参考 sample。** -- sendBubble: PropTypes.string -- 点九图的名字(Android only) - +- sendBubble: PropTypes.object: +``` +// eg: + { + imageName:"inComing_bubble", + padding:{left:10,top:10,right:15,bottom:10} + } +``` -- receiveBubble: PropTypes.string — 同上(Android only) +- receiveBubble: PropTypes.object — 同上 - sendBubbleTextColor: PropTypes.string, @@ -258,7 +264,17 @@ AuroraIMUIModule.insertMessagesToTop(messages); - receiveBubbleTextSize: PropTypes.number, -padding 对象包括四个属性: left, top, right, bottom. eg: {left: 5, top: 5, right: 15, bottom: 5} +padding 对象包括四个属性: left, top, right, bottom. + +``` + // eg: + { + left: 5, + top: 5, + right: 15, + bottom: 5 + } +``` - sendBubblePadding: PropTypes.object