Jump to content
GabrielMoraru

Dealing with modality on Android

Recommended Posts

Hi

I want to pass an object to a form (TfrmGemini) so the use can change the parameters of that object.

 

Quote

 class procedure TfrmGemini.ShowSettings(aGemini: TGeminiClient);

 

What are the patterns that you are using on Android where modality is not available?

There are several patterns like Callback Pattern (the one I used until now), Interface Pattern,  Event-Based Pattern, Temporary Ownership, ObjectCopy Pattern (but Delphi is not good at making deep copies of an object).

 

Idea: Android does not support modal forms, but any form is full screen. If you don't give the user the chance to return to the main form, then the secondary form acts (in theory) as modal form. But I don't know if this is guaranteed. Are there are any circumstances in which a user may force its way out from the secondary form back to the main form.

Of course, when you show the second form (in full screen) the program execution will continue. The program will not wait until the user enters the new parameters for TGeminiClient. But in some circumstances (like this one) this is ok since the user won't be able to do anything with the program until he exists the second form.

 

PS: There are dirty tricks that makes a normal form behave like a modal form. I definitively don't want to mess with that.

 

Edited by GabrielMoraru

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×