State of views

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to all.
The problems is the following:
I want to preserve the state of a Button (Enabled/Disabled) which is inside an Activity, during orientation changes (for example) that imply activity destruction. In theory it seems that I could save the state of the views during an ActivityPause and ripristinate it during ActivityResume. But I saw with the debugger that ActivityPause is not called if I change the orientation... What am I missing? Any other advice for this problem?
Thanks in advance..
 

klaus

Expert
Licensed User
Longtime User
But I saw with the debugger that ActivityPause is not called if I change the orientation...
How do you come to this conclusion ?
Sure, Activity_Pause is called when you change the orientation !
Add a Log("pause") in the Activity_Pause routine and look at the Logs when you change orientation.

Best regards.
 
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
ActivityPause

Thanks for giving me this certainty, but, despite displaying a LOG message, I agree, what I verify is that debugger breakpoints don't work inside ActivityPause. The problem arose from the fact that I use debugger to understand program flow and not LOG. I am rather sure that it doesn't stop there.. I used even a b4a simple template, with no other stuff. The phone is connected by cable. Thanks again.
 
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Moreover

I also see that any function called from activityPause is not followable with debugger.. Is it normal, or am I missing something? The attached screen-shot shows what I mean: despite displaying log message, no breakpoint is trapped...
 

Attachments

  • Clipboard01.jpg
    Clipboard01.jpg
    53.8 KB · Views: 199
Upvote 0
Top