El 12/04/2013 11:22, Felipe Monteiro de Carvalho escribió:
On Fri, Apr 12, 2013 at 10:46 AM, Felipe Monteiro de Carvalho
<[email protected]> wrote:
Do you have any link to the docs that say that every window should
have a new Activity? Window does not descend from Activity. It does
not look correct to me... but I will study the issue.

So if you have 1 app with 1 button and clicking on the button you get
a fullscreen window to select a file you would need 2 activies
(because 2 forms)? Looks very strange to me.


Hello,

Yes, that's the way/idea. Every activity should be considered an atomic user interface operation, any operation that could be logically performed in other activity should be in other activity. OS can unload each activity at any time, except the forefront one. Also data related directly to each activity is expected to be in activity related memory so a simple rotation of the device kills this memory blocks and the programmer should save important state variables in a process related memory.

From a pascal/LCL point of view your approach is more robust because LCL is not designed to survive a situation where only one form (the forefront one) can exists, while an android app should survive.

Usual bug in android apps follows this steps:

1) Show an activity
2) User selects something that opens a second activity
3) Second activity is created and shown.
4) First activity is destroyed by the OS.
5) Second activity is destroyed.
6) First activity is recreated by the OS but its state is as how it was in step 1, not in step 2 (programmer expect).

--


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to