Closed kobygold closed 3 years ago
@kobygold thanks for the report!
So, MainActivity.getContentView doesn't really exist below 10.4, but as far as i know the correct replacement would be:
MainActivity.getViewGroup
I will not be able to test, I only have 10.4.1. Can you test for me?
Hi Viniciusfbb, Thanks for you quick reply! Yes, MainActivity.getViewGroup Works in Delphi 10.3.3 and gets the job done!
BTW, do you know if there is a way to know if the navigation bar is located at the bottom of the screen or on the right side of the screen? This changes depending on orientation of the device and on the device type (i.e. phone vs. Tablet), and I would like to create a function that will return the actual full-screen size, including the navigation bar region (when I use screen.size.width and screen.size.height, they return the size without the navigation bar size, even when configured at full-size on Delphi).
Thanks, Koby
On Sat, Apr 24, 2021, 03:03 Vinícius Felipe Botelho Barbosa < @.***> wrote:
@kobygold https://github.com/kobygold thanks for the report!
So, MainActivity.getContentView doesn't really exist below 10.4, but as far as i know the correct replacement would be: MainActivity.getViewGroup
I will not be able to test, I only have 10.4.1. Can you test for me?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/viniciusfbb/fmx_tutorials/issues/3#issuecomment-825998689, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTOUUUEX5WXJGFWHQLXDLDTKIDFFANCNFSM43POBMFA .
I would like to create a function that will return the actual full-screen size, including the navigation bar region
After the TAndroidSystemBars.RemoveSystemBarsBackground(TAlphaColors.White, TAlphaColors.White);
in your TForm1.FormCreate
, the form size will be the size of the screen, as if the form were in fullscreen mode (note: you don't need to change any form property)
Do you know if there is a way to know if the navigation bar is located at the bottom of the screen or on the right side of the screen?
When I have more time I have to search for a solution using Java to be able to port to Delphi, because it is not so trivial as the Status Bar can be located on the left, right or bottom, according to the android version, the screen size and rotation angle.
About this report, I have committed a fix to work on all the latest versions and one fix to work in Android 6.
Closed. If there are another subject, please open a new one issue.
Hi Vinicius! Thank you for the quick fix! Can you please send me an email, so I could reach you and we could continue the discussion on the position of the android bar, as this thread is not the right place for that. My email is: kobygold(at-no-spam)gmail. (Replace the (at-no-spam) with @ and add Com after gmail.)
Thanks, Koby
On Sat, Apr 24, 2021, 15:33 Vinícius Felipe Botelho Barbosa < @.***> wrote:
Closed. If there are another subject, please open a new one issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/viniciusfbb/fmx_tutorials/issues/3#issuecomment-826086223, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTOUUQWXAHMUUQXKHZMUDLTKK3DFANCNFSM43POBMFA .
Koby, I would love to send an email but this is a topic of public interest so a public discussion is more appropriate. I created an issue for this: Navigation bar location (left, right or bottom) #4
Hi, When using Delphi 10.3.3 (Community Edition) there is a compilation error: [DCC Error] iPub.Android.SystemBars.pas(268): E2003 Undeclared identifier: 'getContentView'
I managed to solve the error by changing line 268 from this: LView := MainActivity.getContentView to this: LView := MainActivity.getCurrentFocus
But I don't know how to make the fix in such a way it will affect Delphi 10.3.3 only...
Please review my fix, and fix your code to support both versions, if you can.
Thanks, Koby