Setting the background colour or image for entire screen

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
j9v6
Posts: 72
Joined: Tue Aug 06, 2019 9:27 am
Location: U.K.
Contact:

Setting the background colour or image for entire screen

Post by j9v6 » Thu Mar 25, 2021 6:10 pm

Hello all, I'm in the process of updating my iOS app to support Android and wondered if someone can point me in the right direction. I'm currently finding that the app is working ok but is showing the android status bar and soft nav bar with black backgrounds and white text & icons instead of my stack background colour. I programatically build the UI using values returned from screenRect but 0,0 appears to be below the status bar. I'm trying to understand if it is possible to place a colour graphic or an image in the app background to occupy the entire android screen including the status bar and soft nav bar so that these appear over it? I've attached a couple of screen shots to show my test app with the black status bar and nav bar, then the android home screen with the wallpaper behind them.
Thanks for any pointers.
Cheers,
Al.
Screenshot 1.jpg
Screenshot 2.jpg

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9250
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Setting the background colour or image for entire screen

Post by richmond62 » Thu Mar 25, 2021 6:57 pm

Can you find an Android app that uses a non-standard bar at the top?

j9v6
Posts: 72
Joined: Tue Aug 06, 2019 9:27 am
Location: U.K.
Contact:

Re: Setting the background colour or image for entire screen

Post by j9v6 » Thu Mar 25, 2021 7:25 pm

All the standard apps that come with my Android phone (I’ve got a Huawei Smart P 2019) show the status bar and nav bar as light grey with black text which is the same colour as the app background. Also looks like it’s the same in the android sim I’m using (Nexus 6 and Pixel).

Maybe it came be set black on white or reversed?

j9v6
Posts: 72
Joined: Tue Aug 06, 2019 9:27 am
Location: U.K.
Contact:

Re: Setting the background colour or image for entire screen

Post by j9v6 » Fri Mar 26, 2021 1:16 pm

So, here's the news...

It can't be done as of LiveCode 9.6.1

But there is a bug report in the system regarding this which I've just added my comments to.

If you would like update your Android app and improve its UI to use Androids current design standards (which means being able to set the background colour of these areas), please consider adding a note or request to the bug report (link below).

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

I'm sure if enough of us ask for it, the team will consider updating LC to support this.

Cheers,
Al.

bwmilby
Posts: 438
Joined: Wed Jun 07, 2017 5:37 am
Location: Henrico, VA
Contact:

Re: Setting the background colour or image for entire screen

Post by bwmilby » Fri Mar 26, 2021 11:17 pm

I would take this a step further and say that Android should probably work like iOS where the screenrect includes the entire screen (including the areas behind the system header bar). I'm not sure if Material Design means that you should just set the colors for the the header bar background or if is also allows for image/graphic backgrounds in that area.

Although one nice thing about the way it currently works for Android is that you don't have to worry about the notch since it isn't in the screenrect. If that changed, then an easy way to know/query about the notch would be important. It is fairly easy to code for that on iOS due to the limited number of screen sizes, but this could get very complicated on Android.
Brian Milby

Script Tracker https://github.com/bwmilby/scriptTracker

Post Reply

Return to “Android Deployment”