Skip to content

Commit

Permalink
Pull request #36: MCA-3182 InAppChatInputView customizations improvement
Browse files Browse the repository at this point in the history
Merge in MML/infobip-mobile-messaging-android.wiki from jdzubak-MCA-3182-customizations-improvement to master

Squashed commit of the following:

commit 74e2a970d1e1a9984d8fad9b75a2265d07a62356
Author: Jakub Dzubak <[email protected]>
Date:   Mon Sep 11 16:50:49 2023 +0200

    MCA-3182 InAppChatInputView customizations improvement

commit cd64500e0e9bdb53f47ec9ef2dbc33307d189a00
Author: Jakub Dzubak <[email protected]>
Date:   Fri Sep 8 10:20:14 2023 +0200

    MCA-3182 InAppChatInputView customizations improvement
  • Loading branch information
jakubdzubak1 committed Sep 11, 2023
1 parent 494f0d6 commit 309ad5b
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions In‐app-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,24 +145,26 @@ To customize the In-app chat you have to define your own custom theme. There are
```
2. In code, you can pass `InAppChatTheme` to `InAppChat.setTheme()`, which provides same customization as the xml approach.
```kotlin
InAppChat.getInstance(context).setTheme(InAppChatTheme(
InAppChatToolbarStyle(), //chat toolbar
InAppChatToolbarStyle(), //attachment toolbar
InAppChatStyle(),
InAppChatInputViewStyle()
)
InAppChat.getInstance(context).setTheme(
InAppChatTheme(
InAppChatToolbarStyle(), //chat toolbar
InAppChatToolbarStyle(), //attachment toolbar
InAppChatStyle(),
InAppChatInputViewStyle()
)
)
```
<details><summary>expand to see Java code</summary>
<p>

```java
InAppChat.getInstance(context).setTheme(new InAppChatTheme(
new InAppChatToolbarStyle(), //chat toolbar
new InAppChatToolbarStyle(), //attachment toolbar
new InAppChatStyle(),
new InAppChatInputViewStyle()
)
InAppChat.getInstance(context).setTheme(
new InAppChatTheme(
new InAppChatToolbarStyle(), //chat toolbar
new InAppChatToolbarStyle(), //attachment toolbar
new InAppChatStyle(),
new InAppChatInputViewStyle()
)
);
```

Expand Down Expand Up @@ -224,8 +226,12 @@ Theme attribute `ibChatInputStyle` supports the following chat input style attri
<item name="ibChatInputBackgroundColor">@android:color/white</item>
<item name="ibChatInputHintText">Your custom hint</item>
<item name="ibChatInputHintTextColor">@android:color/darker_gray</item>
<item name="ibChatInputAttachmentBackgroundColor">@android:color/white</item>
<item name="ibChatInputAttachmentBackgroundDrawable">@null</item>
<item name="ibChatInputAttachmentIcon">@null</item>
<item name="ibChatInputAttachmentIconTint">@android:color/black</item>
<item name="ibChatInputSendBackgroundColor">@android:color/white</item>
<item name="ibChatInputSendBackgroundDrawable">@null</item>
<item name="ibChatInputSendIcon">@null</item>
<item name="ibChatInputSendIconTint">@android:color/black</item>
<item name="ibChatInputSeparatorLineColor">@android:color/darker_gray</item>
Expand Down

0 comments on commit 309ad5b

Please sign in to comment.