【问题标题】:Zopim Chat: How can I customize the avatar icon and chat backgroundZopim Chat:如何自定义头像图标和聊天背景
【发布时间】:2015-10-29 07:54:00
【问题描述】:

我在 Android 应用程序中使用 Zopim Chat。我面临两个问题:

首先,有没有办法自定义默认聊天头像? 我尝试在 values.xml 中搜索与可绘制对象关联的样式(如他们的 documentation 中所建议的那样),但没有找到任何东西。

其次,如何应用不同的背景颜色?这是我添加到我的 values.xml 文件中的内容:

<style name="chat_widget_background">
        <item name="android:background">@color/red</item>
</style>

我希望聊天背景是红色的,但它仍然是默认的灰色。是不是我做错了什么?

感谢您的帮助!

【问题讨论】:

    标签: android zendesk


    【解决方案1】:

    1 - 聊天代理图像可从 Zopim 仪表板的“个人设置”中设置。图像将在 Android 应用程序上自动设置。此功能在免费计划中不可用,您可以在定价表 (https://www.zopim.com/pricing) 中查看。

    2 - 如果您想为气泡聊天应用不同的背景颜色,请转到“values”->“chat_style.xml”并编辑以下内容

    <style name="_chat_bubble_visitor">
        <item name="android:textSize">16sp</item>
        <item name="android:textColor">@color/mycolor</item>
        <item name="android:background">set your background from @drawable or @color</item>
        <item name="android:minHeight">@dimen/chat_bubble_min_height</item>
        <item name="android:minWidth">@dimen/chat_bubble_min_width</item>
        <item name="android:gravity">start|center_vertical</item>
        <item name="android:padding">@dimen/chat_bubble_padding</item>
    </style>
    

    <style name="_chat_bubble_agent">
       ....
    </style>
    

    如果您必须设置主聊天的背景,请在包含 zopim 聊天片段的活动中进行设置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-21
      • 2015-02-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多