In my FMX project I’m using the platform defines for code that is required for Android or Windows like so:
{$IFDEF MSWINDOWS}
DoSomeWindowsStuff;
{$ENDIF}
{$IFDEF ANDROID}
DoTheAndroidVersion;
{$ENDIF}
In general this works apart from sometimes the “dimming” of the editor text sticks on a previously selected platform. This makes it hard to read code I’m actually working on and causes confusion about what code is in play.
I usually double click the platform in the Projects windows, but the same issue happens when using the platform drop down box in the toolbar. I can’t see any definite pattern to it so far. Sometimes the editor does update correctly. Closing and reopening the project brings it right, so the defines are correct. Has anyone else seen this?