Change the color of the android native bar.

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Change the color of the android native bar.

Post by Jellobus » Thu Sep 12, 2019 1:00 am

Hello,

Is it possible to change the color of the android native button bar? I like to change grey to black so that the color theme would match my app.

Thanks in advance!
Attachments
nativeButtons.png

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Change the color of the android native bar.

Post by bogs » Thu Sep 12, 2019 8:29 am

Just as a guess I'd think it would not be allowed by the android OS.
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Change the color of the android native bar.

Post by FourthWorld » Thu Sep 12, 2019 8:47 am

In the Colors tab of the Inspector you should have an option for setting the Background Color, no?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: Change the color of the android native bar.

Post by Jellobus » Tue Sep 17, 2019 5:01 pm

Hi bogs, FourthWorld,

I tested by setting all colors black in the inspector, but the color of the navigation bar does not change. Any walkaround with manifest file?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Change the color of the android native bar.

Post by FourthWorld » Tue Sep 17, 2019 5:57 pm

I don't know of a workaround. The best I can recommend is to dive into the widget code to fix it, or submit a bug report for the team to do so.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Change the color of the android native bar.

Post by bogs » Tue Sep 17, 2019 6:34 pm

Sorry Jellobus, I don't dev for mobile of any kind, but as I said in my first post, since the nav bar is provided by the Android OS, and not Lc, I really doubt there is any way you are going to change anything about it. Just an opinion on my part.

There *is* an api for it, which you can find out about here...
setNavigationBarColor
Added in API level 21

public abstract void setNavigationBarColor (int color)

Sets the color of the navigation bar to . For this to take effect, the window must be drawing the system bar backgrounds with WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS and WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION must not be set. If is not opaque, consider setting View.SYSTEM_UI_FLAG_LAYOUT_STABLE and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION.

The transitionName for the view background will be "android:navigation:background".

Related XML Attributes:

android:navigationBarColor
...but I have no idea whether Lc can take advantage of that or not. Maybe Jacque (or someone that actually builds stuff for android) knows :? but I really really doubt it is a bug, per se, since it is not part of your app.
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Change the color of the android native bar.

Post by FourthWorld » Tue Sep 17, 2019 6:58 pm

Good find, Bogs.

Widgets are written in LiveCode Builder, which provides a scripting interface for OS APIs, so this seems quite doable.

Whether this is a bug per se or an enhancement request may be a matter of opinion. Personally, since the color is unresponsive to the UI provided in the Inspector I'd consider it a bug.

But either way, unless someone here is in a position to add support for that to the widget a bug report will be needed to bring it to the team's attention.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: Change the color of the android native bar.

Post by Jellobus » Sat Sep 28, 2019 4:27 pm

Thanks guys,

I have reported it a bug to the quality control center.

https://quality.livecode.com/show_bug.cgi?id=22394

Cheers,

Louis

Post Reply

Return to “Android Deployment”