Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/FireMonkey/Standard    [ Add a report in this area ]  
Report #:  134531   Status: Reported
Incorrect display after changing screen orientation on "Lenovo TAB S8-50LC" with CPU Intel Atom
Project:  Delphi Build #:  23.0.20618.2753
Version:    21.0 Submitted By:   Andrei Amelchanka
Report Type:  Basic functionality failure Date Reported:  10/27/2015 9:51:51 AM
Severity:    Critical / Show Stopper Last Updated: 10/27/2015 9:55:57 AM
Platform:    Google mobile OS Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Incorrect display Firemonkey app after changing screen orientation on "Lenovo TAB S8-50LC" with CPU Intel Atom: http://delphi.by/img/lenovo_2.png

Possibly changing of screen orientation is very fast and instead landscape orientation displays portrait orientation and vice versa.

To fix this problem need find in "FMX.Platform.Android.pas" the procedure "TPlatformAndroid.HandleAndroidCmd(ACmd: Int32);" and the lines:

===============
APP_CMD_CONFIG_CHANGED:
begin
FContentRectMightHaveChanged := ContentRectChangeRefreshCount;  // <<--- here
FOrientationMightHaveChanged := True;
Include(FAppCmdStates, TAndroidAppCmdState.ConfigChanged);
end;
===============

In the marked line is multiplied ContentRectChangeRefreshCount by 3 or 4:
FContentRectMightHaveChanged := ContentRectChangeRefreshCount * 4;

After fixing "FMX.Platform.Android.pas" and recompile application changing screen orientation looks correct: http://delphi.by/img/lenovo_2c.jpg

Tested Delphi 10 Seattle and device Lenovo TAB S8-50LC.

Sorry for my English.
Steps to Reproduce:
1) Create a Firemonkey app;
2) run application on device Lenovo TAB S8.
3) change device orientation.
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01