Page 1 of 1

Making Android Native Field Not Opaque

Posted: Wed Dec 02, 2020 9:13 pm
by cdev007
Is there a way to make an Android Native Field not opaque?

Re: Making Android Native Field Not Opaque

Posted: Mon Dec 07, 2020 8:28 pm
by cdev007
Is this something that I should post on the suggestions forum since I'm assuming there is no way to do this at the present?

Re: Making Android Native Field Not Opaque

Posted: Mon Dec 07, 2020 8:41 pm
by richmond62
I would suppose the clever thing to do is to fill in an enhancement request over here:

https://quality.livecode.com/

Re: Making Android Native Field Not Opaque

Posted: Mon Dec 07, 2020 8:43 pm
by kdjanz
I don’t have an Android device for testing, but could you

Code: Select all

set the background colour ...
of the field to an appropriate hue?

Re: Making Android Native Field Not Opaque

Posted: Mon Dec 07, 2020 8:57 pm
by richmond62
an appropriate hue
is something different to transparency.

Re: Making Android Native Field Not Opaque

Posted: Sat Aug 07, 2021 5:31 pm
by cdev007
richmond62 wrote:
Mon Dec 07, 2020 8:41 pm
I would suppose the clever thing to do is to fill in an enhancement request over here:

After submitting an enhancement request this is the response I got. BTW FYI.




In the effort of creating a mobile control field (in my case with a nice rounded perimeter) that can look and act more or less the same on 3 platforms (oSX,Android,iOS), the fact that on android the native field background is alway opaque make this almost impossible.

This is due to 2 facts:
- if the rect of the android control is less then 38 px Hight, the text is not shown or it is cut out.
- the vertical text alignment on Android is always to the top and cannot be changed

This imply to always have enormous field rects.

Native Android fields in LC are very limited in properties.

Android vertical text alignment and not being able on android to have a non opaque mobile field are a problem

To note also that on Android 9 TV box (where LC standalone runs just fine) the horizontal editing window of a native field is different from the one on a cell phone:

While on the cell phone the editing window cover completely the screen, so mitigating the fact that the field rect is out of size, on a TV box the keyboard appears but the top part of the screen remain the standalone window, so making very visible the enormous field height required by the Android native field.

Re: Making Android Native Field Not Opaque

Posted: Sat Aug 07, 2021 9:26 pm
by richmond62
While on the cell phone the editing window cover completely the screen, so mitigating the fact that the field rect is out of size, on a TV box the keyboard appears but the top part of the screen remain the standalone window, so making very visible the enormous field height required by the Android native field.
I feel very uncomfortable about that as, as far as I know, LiveCode does not employ someone
with such bad English grammar.

Re: Making Android Native Field Not Opaque

Posted: Sun Aug 08, 2021 5:58 pm
by jacque
This looks like the request, not the reply. What's the bug number?

Edit: Found it. https://quality.livecode.com/show_bug.cgi?id=23026
It's an older bug. The quoted text above is one of the user entries.

If you create a native field the original way using mobileControlCreate you can make the field transparent and apply many more properties than the widget allows.

Re: Making Android Native Field Not Opaque

Posted: Mon Aug 09, 2021 10:04 am
by richmond62
apply many more properties than the widget allows
The exact reason why I will always prefer "rolling your own" to using a widget,

Re: Making Android Native Field Not Opaque

Posted: Wed Sep 20, 2023 5:43 pm
by trevix
I hope that in the meantime my grammar has improved and it won't bother you too much.

What I consider a bug has been dormant for 2 years now and I'm wondering why no one else has my problem with fields in Android.
In my opinion, in order not to cut the text above or below, in Android it is necessary to use a font size that is way too small compared to the size occupied by the field.
And this applies to both the widget and using mobileControlCreate.

All this mess because at the time we decided to make an app with text input fields with rounded corners, in all platforms.

PS: among other things in Android mobileControlSet sControlID, "alpha" has no effect (although in my case I don't think it would be useful, since in theory it would also make the text transparent).