Hiding Zoom in and Out Buttons in Browser Widget.

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Hiding Zoom in and Out Buttons in Browser Widget.

Post by Googie85 » Sun Oct 31, 2021 8:49 am

Hi Guys!!

I am trying to hide the Zoom in and Out buttons on a web browser widget. I have tried resizing the browser widget to display the bottom of the widget below the visible portion of the screen. No luck with that. I have also tried to cover the area where the buttons are displayed with an image, but the widget seems to display as "Display Above Everything". I know the Zoom in and Out buttons will only display on Android Devices only.

I really hope I have explained my situation clearly!!

Many Thanks,

Googie.

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Oct 31, 2021 9:59 am

So, I opened a new stack and set up a browser widget:
-
SShot 2021-10-31 at 10.57.45.png
-
And CANNOT see any Zoom buttons . . .

At the risk of seeming very stupid, could you upload a screen shot of your browser
widget with those Zoom buttons, or, even better, attach a stack so that I can open
it on my machine and see how things work?
I know the Zoom in and Out buttons will only display on Android Devices only.
OK, OK, I AM being STUPID.

HOWEVER, I would have expected these to show up somewhere in the preferences palette:
-
SShot 2021-10-31 at 11.05.20.png

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Oct 31, 2021 10:13 am

HOWEVER this is USELESS:

Code: Select all

on mouseUp
   get the properties of control "BX"
   combine it using return and ":"
   put it into fld "bPROPS"
end mouseUp
It seems, that at the moment one cannot get hold of the properties of a widget:

2016

viewtopic.php?t=27183

Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by Googie85 » Sun Oct 31, 2021 10:21 am

Thanks Richmond62, I appreciate your feedback!

Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by Googie85 » Sun Oct 31, 2021 10:26 am

Here is a quick screen shot...

Image

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Oct 31, 2021 10:29 am

The screenshot shows those Zoom buttons "loud and clear",
but as there does NOT seem a way to access the Browser widgets
properties there does not seem an obvious way to remove/disable
those buttons.

I wonder if those Zoom buttons show up on iOS?

It may be, that if they don't (and ONLY show up on
Android) they are, somehow coming from the
underlying Android system rather than LiveCode
itself.

Mind you, I do think what I just typed looks a bit silly,
as I would have expected LiveCode to allow us to mess
around with those features which look integral to the
widget.

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Oct 31, 2021 10:35 am

SShot 2021-10-31 at 11.34.51.png
-
Just a thought.

Whether "disable zoom via user interaction" will make the Zoom buttons on Android disappear
if you set the lockZoom of the browser widget to true . . . . ?

Code: Select all

on mouseUp
   set the lockZoom of widget "BX" to true
   put the lockZoom of widget "BX"
end mouseUp

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by jacque » Sun Oct 31, 2021 5:22 pm

The dictionary indicates that lockZoom only applies to the PDF widget. I took a look at one of my Android apps and it too displays the zoom controls as soon as you scroll the browser widget. LC implements this as a system control, which is Chrome on Android, and I don't know of any way to change it.

On the plus side, users are used to it and will expect it, or at least ignore it. But you could submit a feature request asking if it can be removed.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Oct 31, 2021 5:54 pm

I do believe that the more control the end-user has (and here I mean
programmers, not users of programs we have made) in terms
of properties and so on, the better.

This IS the main reason I am not keen on Widgets and would far rather, when possible,
"roll my own" from 'standard' LiveCode controls.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7228
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by jacque » Sun Oct 31, 2021 8:02 pm

There is an API for showing or hiding the zoom buttons. LC is calling the OS to provide the web view which has a few properties that can be set. The older, and simpler, API that controls the zoom buttons has been deprecated and I'm not sure how complicated it would be to implement the new method, but a feature request in the QCC is your best bet.
This IS the main reason I am not keen on Widgets and would far rather, when possible,
"roll my own" from 'standard' LiveCode controls.
In this case the property would apply to both the browser widget and the mobileControlCreate syntax, so it would require an engine change to fix it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by Googie85 » Sun Nov 07, 2021 8:29 am

Is there a way to make an image float above the browser widget? Just curious if anyone knows if this is possible.

Many Thanks,

Googie.

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Nov 07, 2021 10:19 am

The Browser appears to mask images even when they are on higher layers:
-
SShot 2021-11-07 at 11.18.21.png
-
SShot 2021-11-07 at 11.18.06.png

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Nov 07, 2021 11:10 am

BUT . . .

You CAN overlay one Browser widget with another one:
-
SShot 2021-11-07 at 12.08.41.png
-
SShot 2021-11-07 at 12.08.52.png

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

Re: Hiding Zoom in and Out Buttons in Browser Widget.

Post by richmond62 » Sun Nov 07, 2021 12:33 pm

And if one sets the URL for one's covering browser widget to a suitably sized image (which my example is not)
one can achieve the effect of an image covering a browser:
-
Satyrs.jpg

Post Reply

Return to “Android Deployment”