EduardoElias Well-Known Member Licensed User Longtime User Jul 30, 2017 #1 I set the color of my appbar to orange at first time and it works. After that I have a timer that every 5 seconds check WIFI Signal LEVEL. If the Level quality drops I change the App Bar color accordingly giving and clue to the user. I am using this code Code: Copy Sub SetActionBarColor(Color As Int) Dim jo As JavaObject jo.InitializeContext Dim cd As ColorDrawable cd.Initialize(Color, 0) jo.RunMethodJO("getActionBar", Null).RunMethod("setBackgroundDrawable", Array(cd)) End Sub On a Motorola Xoom 4.0.4 Android What is happening is that the color is turning to black, that I am not using at all. It happens when trying to set Orange as color, it turns as black. In every other tablet and cellphone that I have it is work just as expected. Only this one cause this problem. Using lastest B4A
I set the color of my appbar to orange at first time and it works. After that I have a timer that every 5 seconds check WIFI Signal LEVEL. If the Level quality drops I change the App Bar color accordingly giving and clue to the user. I am using this code Code: Copy Sub SetActionBarColor(Color As Int) Dim jo As JavaObject jo.InitializeContext Dim cd As ColorDrawable cd.Initialize(Color, 0) jo.RunMethodJO("getActionBar", Null).RunMethod("setBackgroundDrawable", Array(cd)) End Sub On a Motorola Xoom 4.0.4 Android What is happening is that the color is turning to black, that I am not using at all. It happens when trying to set Orange as color, it turns as black. In every other tablet and cellphone that I have it is work just as expected. Only this one cause this problem. Using lastest B4A
Erel B4X founder Staff member Licensed User Longtime User Jul 31, 2017 #2 Test it with AppCompat: AppCompat with ToolBar - minimal example It might work as the action bar is not based on the system implementation (on older devices). Upvote 0
Test it with AppCompat: AppCompat with ToolBar - minimal example It might work as the action bar is not based on the system implementation (on older devices).