Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Form.show and Transparency on Android



Permlink Replies: 10 - Last Post: Jul 2, 2014 1:00 PM Last Post By: Graham Murt
Graham Murt

Posts: 70
Registered: 5/15/07
Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 5:35 AM
Hi there,

Xe6 - update 1
Android platform - I've not tested on iOS yet

I'm having big problems trying to track down a form.show problem in my code and I think it must be a bug with the latest XE6 Upd1.

All my forms have "Transparency" switched on as I have smaller popup forms which I've created.

If I show a form over an existing form using the Show; command, all is fine. Now if I show another from above the form we've just shown, then it doesn't bring it to the front, it sandwiches it beween the main form and the first we showed.

Without transparency, it works fine but then we can't see the forms below.

To recap...
- 1 main form and 2 popup forms with transparency enabled.
- Show first popup form
- show the second popup form from a button click on the first popup form
- the forms are now in the wrong order and bringtofront doesn't seem to have any affect.

screenshots...
main form: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-24.png
popup 1: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png
popup 2 (shown from popup 1): https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-50.png

Can someone confirm this is a bug, and (hopefully) suggest a work-around?

Cheers,
Graham
Graham Murt

Posts: 70
Registered: 5/15/07
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 6:00 AM   in response to: Graham Murt in response to: Graham Murt
More issues related to transparency I think...

When the first popup form is displayed (with transparency) over the main form, and the app is then minimized then restored, the screen becomes scrambled... do these things really slip through QA?

my device is a Nexus 7 (2012) with android 4.4.4

Graham


Graham Murt wrote:
Hi there,

Xe6 - update 1
Android platform - I've not tested on iOS yet

I'm having big problems trying to track down a form.show problem in my code and I think it must be a bug with the latest XE6 Upd1.

All my forms have "Transparency" switched on as I have smaller popup forms which I've created.

If I show a form over an existing form using the Show; command, all is fine. Now if I show another from above the form we've just shown, then it doesn't bring it to the front, it sandwiches it beween the main form and the first we showed.

Without transparency, it works fine but then we can't see the forms below.

To recap...
- 1 main form and 2 popup forms with transparency enabled.
- Show first popup form
- show the second popup form from a button click on the first popup form
- the forms are now in the wrong order and bringtofront doesn't seem to have any affect.

screenshots...
main form: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-24.png
popup 1: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png
popup 2 (shown from popup 1): https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-50.png

Can someone confirm this is a bug, and (hopefully) suggest a work-around?

Cheers,
Graham
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 11:18 AM   in response to: Graham Murt in response to: Graham Murt
Am 30.06.2014 15:00, schrieb Graham Murt:
More issues related to transparency I think...

When the first popup form is displayed (with transparency) over the main form, and the app is then minimized then restored, the screen becomes scrambled... do these things really slip through QA?

my device is a Nexus 7 (2012) with android 4.4.4

Graham

Hello,

I'm not sure for what exact purpose transparent forms are designed for
on these mobile plattforms, but:

1. there surely are methods for brinnging a form to front, don't
they work?

2. did you already report your findings to QC?

Greetings

Markus
Graham Murt

Posts: 70
Registered: 5/15/07
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 12:19 PM   in response to: Markus Humm in response to: Markus Humm
Hi Markus,

no, BringToFront does not work. I spent the morning trying different things but no success.

Here's how it looks on the iPad (works correctly)...
https://dl.dropboxusercontent.com/u/24455058/2014-06-30%2020.12.39.png

But on Android, the 3rd form shows behind the second.

If I get time later I'll look at how to report this to Embarcadero but I've got some tight deadlines here so I'll just have to drop the android version for the time being.

Graham


Markus Humm wrote:
Am 30.06.2014 15:00, schrieb Graham Murt:
More issues related to transparency I think...

When the first popup form is displayed (with transparency) over the main form, and the app is then minimized then restored, the screen becomes scrambled... do these things really slip through QA?

my device is a Nexus 7 (2012) with android 4.4.4

Graham

Hello,

I'm not sure for what exact purpose transparent forms are designed for
on these mobile plattforms, but:

1. there surely are methods for brinnging a form to front, don't
they work?

2. did you already report your findings to QC?

Greetings

Markus
Graham Murt

Posts: 70
Registered: 5/15/07
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 12:55 PM   in response to: Graham Murt in response to: Graham Murt
Here's an image of the android app after minimizing and restoring on my Nexus 7, Android 4.4.4.

Before minimizing...
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png

I then press the home button on my device, then restore the app...

https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-20-42-58.png

If Embarcadero are monitoring these groups, please could you log these bugs. I paid a lot for Delphi but the android platform is too buggy for me to use at the moment. Such a shame as I was really excited about this.

Kind regards,
Graham Murt

Graham Murt wrote:
More issues related to transparency I think...

When the first popup form is displayed (with transparency) over the main form, and the app is then minimized then restored, the screen becomes scrambled... do these things really slip through QA?

my device is a Nexus 7 (2012) with android 4.4.4

Graham


Graham Murt wrote:
Hi there,

Xe6 - update 1
Android platform - I've not tested on iOS yet

I'm having big problems trying to track down a form.show problem in my code and I think it must be a bug with the latest XE6 Upd1.

All my forms have "Transparency" switched on as I have smaller popup forms which I've created.

If I show a form over an existing form using the Show; command, all is fine. Now if I show another from above the form we've just shown, then it doesn't bring it to the front, it sandwiches it beween the main form and the first we showed.

Without transparency, it works fine but then we can't see the forms below.

To recap...
- 1 main form and 2 popup forms with transparency enabled.
- Show first popup form
- show the second popup form from a button click on the first popup form
- the forms are now in the wrong order and bringtofront doesn't seem to have any affect.

screenshots...
main form: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-24.png
popup 1: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png
popup 2 (shown from popup 1): https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-50.png

Can someone confirm this is a bug, and (hopefully) suggest a work-around?

Cheers,
Graham
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 1, 2014 9:32 AM   in response to: Graham Murt in response to: Graham Murt
Am 30.06.2014 21:55, schrieb Graham Murt:
Here's an image of the android app after minimizing and restoring on my Nexus 7, Android 4.4.4.

Before minimizing...
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png

I then press the home button on my device, then restore the app...

https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-20-42-58.png

If Embarcadero are monitoring these groups, please could you log these bugs. I paid a lot for Delphi but the android platform is too buggy for me to use at the moment. Such a shame as I was really excited about this.

Kind regards,
Graham Murt


Hello,

EMBT is not really routinely monitoring these groups. The issue might
already be logged, but without reporting it into QC or searching for
some existing report we won't know, as there's also an internal system
being used inside EMBT which syncs with QC.

They want to change this, but the current attempt is not set free for
all products yet.

Greetings

Markus
Graham Murt

Posts: 70
Registered: 5/15/07
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 6:18 AM   in response to: Graham Murt in response to: Graham Murt
Me Again!

Just tested on an iPad with iOS 7 and the problem does not exist. It appears to only affect the Android platform.

Graham


Graham Murt wrote:
Hi there,

Xe6 - update 1
Android platform - I've not tested on iOS yet

I'm having big problems trying to track down a form.show problem in my code and I think it must be a bug with the latest XE6 Upd1.

All my forms have "Transparency" switched on as I have smaller popup forms which I've created.

If I show a form over an existing form using the Show; command, all is fine. Now if I show another from above the form we've just shown, then it doesn't bring it to the front, it sandwiches it beween the main form and the first we showed.

Without transparency, it works fine but then we can't see the forms below.

To recap...
- 1 main form and 2 popup forms with transparency enabled.
- Show first popup form
- show the second popup form from a button click on the first popup form
- the forms are now in the wrong order and bringtofront doesn't seem to have any affect.

screenshots...
main form: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-24.png
popup 1: https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png
popup 2 (shown from popup 1): https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-50.png

Can someone confirm this is a bug, and (hopefully) suggest a work-around?

Cheers,
Graham
Douglas Rudd

Posts: 314
Registered: 5/16/97
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 2:28 PM   in response to: Graham Murt in response to: Graham Murt
Just some ideas for workarounds:

1. Get a bitmap of the first form with Layout1.MakeScreenshot and use that as part of second form, and so on with the third form. So you can have non-transparent forms, which you say will work.

2. Probably a good idea if when back button is pressed to minimize app, you should cancel all your secondary forms and go back to main form. This can be done when you get the TApplicationEvent.WillBecomeInactive event.
Graham Murt

Posts: 70
Registered: 5/15/07
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2014 2:43 PM   in response to: Douglas Rudd in response to: Douglas Rudd
Hi Douglas,

Thanks for your suggestion, I had done this before when I implemented a slide out menu but had problems with memory leaks. I was hoping the Transparent issue was fixed but guess it's still got issues.

The second idea isn't really an option from me. It's a restaurant booking app and the booking form may be open with some data already filled in... the user may then need to check extra details in an email... on returning to the app, the display has scrambled.

I'm hoping that by implementing the first suggestion will prevent the second issue.

Thanks again,

Grahaam

Douglas Rudd wrote:
Just some ideas for workarounds:

1. Get a bitmap of the first form with Layout1.MakeScreenshot and use that as part of second form, and so on with the third form. So you can have non-transparent forms, which you say will work.

2. Probably a good idea if when back button is pressed to minimize app, you should cancel all your secondary forms and go back to main form. This can be done when you get the TApplicationEvent.WillBecomeInactive event.
Thierry Laborde

Posts: 3
Registered: 5/12/00
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 1, 2014 6:53 AM   in response to: Graham Murt in response to: Graham Murt
Dans son message précédent, Graham Murt a écrit :
Hi there,

Xe6 - update 1
Android platform - I've not tested on iOS yet

I'm having big problems trying to track down a form.show problem in my code
and I think it must be a bug with the latest XE6 Upd1.

All my forms have "Transparency" switched on as I have smaller popup forms
which I've created.

If I show a form over an existing form using the Show; command, all is fine.
Now if I show another from above the form we've just shown, then it doesn't
bring it to the front, it sandwiches it beween the main form and the first
we showed.

Without transparency, it works fine but then we can't see the forms below.

To recap...
- 1 main form and 2 popup forms with transparency enabled.
- Show first popup form
- show the second popup form from a button click on the first popup form
- the forms are now in the wrong order and bringtofront doesn't seem to have
any affect.

screenshots...
main form:
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-24.png
popup 1:
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png
popup 2 (shown from popup 1):
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-50.png

Can someone confirm this is a bug, and (hopefully) suggest a work-around?

Cheers,
Graham

Hi,

I don't understand why you use the solution of Form with Transparency.
Why the 2 popup forms are not Frame, that you create, assign Parent to
First form and show when you need it ?
Or second solution, put in the popup form a Layout (For example
LayoutPopup1) with all the components and when you need to show it,
just change the parent of LayoutPopup1 to your Main Form, and it whill
show as you want.

--
Thierry Laborde

Embarcadero
Directeur des ventes France

Blog : http://blogs.embarcadero.com/tlaborde
Graham Murt

Posts: 70
Registered: 5/15/07
Re: Form.show and Transparency on Android
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 2, 2014 1:00 PM   in response to: Thierry Laborde in response to: Thierry Laborde
Hi Thierry,

With regards to your comments...

I don't understand why you use the solution of Form with Transparency.

Two reasons really. 1. because the Transparency property is there. If it didn't work, or wasn't supposed to be used then I see little reason for giving me this option in the first place. 2. Because keeping everything seperated in Forms keeps the code neat and tidy. The moment I start setting the parent of a TLayout on one form (which has event code associated with it), to that of another form, then things start to get very messy.

I have it working now on Android using an TImage component in the background to capture the image of the form below. On iOS, the transparency works as expected without this extra process.

Kind regards,
Graham Murt

Thierry LABORDE wrote:
Dans son message précédent, Graham Murt a écrit :
Hi there,

Xe6 - update 1
Android platform - I've not tested on iOS yet

I'm having big problems trying to track down a form.show problem in my code
and I think it must be a bug with the latest XE6 Upd1.

All my forms have "Transparency" switched on as I have smaller popup forms
which I've created.

If I show a form over an existing form using the Show; command, all is fine.
Now if I show another from above the form we've just shown, then it doesn't
bring it to the front, it sandwiches it beween the main form and the first
we showed.

Without transparency, it works fine but then we can't see the forms below.

To recap...
- 1 main form and 2 popup forms with transparency enabled.
- Show first popup form
- show the second popup form from a button click on the first popup form
- the forms are now in the wrong order and bringtofront doesn't seem to have
any affect.

screenshots...
main form:
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-24.png
popup 1:
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-36.png
popup 2 (shown from popup 1):
https://dl.dropboxusercontent.com/u/24455058/Screenshot_2014-06-30-13-32-50.png

Can someone confirm this is a bug, and (hopefully) suggest a work-around?

Cheers,
Graham

Hi,

I don't understand why you use the solution of Form with Transparency.
Why the 2 popup forms are not Frame, that you create, assign Parent to
First form and show when you need it ?
Or second solution, put in the popup form a Layout (For example
LayoutPopup1) with all the components and when you need to show it,
just change the parent of LayoutPopup1 to your Main Form, and it whill
show as you want.

--
Thierry Laborde

Embarcadero
Directeur des ventes France

Blog : http://blogs.embarcadero.com/tlaborde
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02