0

I am working with Mesibo SDK for android and I am trying to change the toolbar color without results.

I would to like to change both colors: https://ibb.co/LrXf4d8

I tried to edit colors.xml and styles.xml but nothing is changing.

Someone has the solution?

I paste part of code.

activity_settings.xml:

 <com.google.android.material.appbar.AppBarLayout
    android:id="@+id/settings_appbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/settings_toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

    </androidx.appcompat.widget.Toolbar>

In the colors.xml file I changed colorPrimary but nothing happened.

MrPlunk
  • 29
  • 1
  • 9

2 Answers2

0

to change the status bar (the notification bar):

<item name="android:windowLightStatusBar">false</item>
<item name="android:statusBarColor">@color/black</item>

to change the title bar:

enter image description here

change the value of "colorPrimary"

JustSightseeing
  • 1,460
  • 3
  • 17
  • 37
0

Use getConfig() to get the configuration instance and then use Config.mToolbarColor to set the color. You need to use ARGB color.

You can refer to the source code is here for other configurable properties

https://github.com/mesibo/ui-modules-android/blob/master/Messaging/messaging/src/main/java/com/mesibo/messaging/MesiboUI.java

mesibo
  • 3,970
  • 6
  • 25
  • 43
  • Hi, thank you for your answer. I am working on android source code, is not possible to change it only editing colors.xml file? Because, on your documents there are not informations to use getConfig() and Config.mToolbarColor – MrPlunk Jun 12 '22 at 23:17
  • If you want it in a particular way, you can download the source code, modify and compile it yourself. It is open-source. – mesibo Jun 17 '22 at 06:09
  • Hi friend, thank you for your message. I downloaded the code from github. I started the code via android studio and I opened the colors.xml file. In this file I changed #fff222 and #ff00868b. I have installed the app on my phone but nothing has been changed. No way to change the colors editing the colors.xml file – MrPlunk Jun 17 '22 at 20:20
  • please check this image: https://ibb.co/RHG78fG . As you can see the button and others color has been changed. But the toolbar, blue and green colors, does not change colors.. – MrPlunk Jun 19 '22 at 15:22