timigod / android-chat-ui

A messages UI library for Android
Apache License 2.0
240 stars 102 forks source link

The Bubble messages has a white backgroundcolor which doesnt change when changing chatbackgroundcolor. How to fix this #31

Closed Tobibur closed 6 years ago

Tobibur commented 6 years ago

screenshot_1533532128 screenshot_1533532164

MichaelObi commented 6 years ago

Hi @Tobibur, I'm sorry you're experiencing this. Just a few questions to get some context What version of the library do you have in your project? Can you provide a snippet showing how you included the ChatView in your layout?

Tobibur commented 6 years ago

my layout

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:chatview="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"

    style="@style/Widget.AppCompat.ButtonBar"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    tools:context=".view.activities.ChatActivity">

    <co.intentservice.chatui.ChatView
        android:id="@+id/chat_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        chatview:backgroundColor="#4DB6AC"
        chatview:bubbleElevation="elevated"
        chatview:bubbleBackgroundRcv="@color/blue"
        chatview:bubbleBackgroundSend="@color/white"
        chatview:inputHint="@string/start_typing"/>

</LinearLayout>

I am using this version:

implementation ('com.github.timigod:android-chat-ui:v0.1.4'){
        exclude module: 'support-v4'
    }
samuelo-101 commented 6 years ago

Hi, @Tobibur Please try specifying colors for the attributes "chatview:backgroundRcv" and "chatview:backgroundSend" in your XML layout. Something like:

chatview:backgroundRcv="@color/blue" chatview:backgroundSend="@color/white"

Tobibur commented 6 years ago

Hi, @samuelojo88 Yes, this worked. Thanks for answering. chatscreenshot

samuelo-101 commented 6 years ago

@Tobibur You're welcome bro :-)