I found the following code to prevent rotation of the screen, but when I compile, I get a bunch of undeclared identifiers IFMXScreenService, TPlatformServices
. Obviously, this is due to missing units. But I can’t find what this unit is.
code:
procedure TLogin.FormCreate(Sender: TObject);
var
ScreenService: IFMXScreenService;
OrientSet: TScreenOrientations;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService) then
begin
ScreenService := TPlatformServices.Current.GetPlatformService
(IFMXScreenService) as IFMXScreenService;
OrientSet := [TScreenOrientation.soLandscape];
ScreenService.SetScreenOrientation(OrientSet);
end;
end;
Any help would be greatly appreciated.
Update:
The lack of a device was FMX.Platform
. But when I try to compile now, I get an error message:\\android\\debug\\libproject.so: open: permission denied
source
share