About the author
Make a call to setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); to get the app displayed in landscape mode, and setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); to switch to portrait mode.
To detect the current screen orientation that has been set by the application, here's how you do it:
int LOrientation = getRequestedOrientation();if (LOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {} ...
if (LOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) { } ...
To detect the current screen orientation without having called getRequestedOrientation before, call getResources().getConfiguration().orientation. The value of orientation will be one of the ActivityInfo.SCREEN_ORIENTATION_xxx values (SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_PORTRAIT, SCREEN_ORIENTATION_SQUARE).
To get the requested screen orientation, call getRequestedOrientation.If the application did not request a screen orientation before, it returns -1.
Continued discussion of undocumented Delphi 8 Property Access Specifiers, and other ways of adding and removing delegates / events handlers, including clearing the list of all the delegates / event handlers.
This article discusses the new Delphi 8 property access specifiers.
A method pointer is now the same as a global procedure, ie, procedure of object = procedure.