Before 10.3 Rio, you couldn’t put other controls on top of a platform-native control like TWebBrowser or TMediaPlayer, The stacking of controls is referred to as Z-Order. This was especially annoying when used with the TMultiView (one of my favorite controls), because the drawer would slide out under rather than over the platform-native control. There were workarounds, but it was still inconvenient.
We introduced the ControlType property for iOS in XE7 and then brought it to Windows in Seattle. Setting it to Platform causes a FireMonkey control to be replaced with a platform-native control at runtime.
The ControlType property is now coming to Android with the upcoming 10.3 Rio release, and it brings two significant benefits: more Native Controls and corrected Z-Ordering.
More Android Native Controls
The TWebBrowser, TMediaPlayer, TBannerAd, and TMapView are always platform native controls (they are rendered by the underlying Android OS and not by FireMonkey.) But in 10.3 Rio there are 4 new controls that are optionally platform native.
That means when you set the ControlType property on these controls they will be rendered by the Android system instead of FireMonkey. You may notice some slight changes in the way they look and work because of this.
This is especially important in the TEdit as there are certain behaviors that are attached to the way users provide keyboard input and edit text. Here are some of the advantages your users will now have when you use a ControlType of Platform with your TEdit
- Auto-Correction: Words are suggested while typing, these can be used by clicking on the space bar.
- Define: You can select a word and click on Define to see the definition of such word in the dictionary.
- “.” Shortcut: Double tapping the space bar inserts a period followed by a space.
- Text Shortcuts:? That will expand into the word or phrase as you type.
Some of these behaviors vary from one Android platform to others (for example Samsung has a Clipboard feature). You can configure these settings on your Android devices in Settings > General > Keyboard.
Native Aware Android Z-Ordering
Additionally many controls now are able to handle a Z-Order over a platform native control. Now you can put control buttons over your TMediaPlayer for example. These controls have a ControlType property that when you set it to Platform it will maintain the Z-Order with other platform-native controls.
- TButton, TSpeedButton, TColorButton, TCornerButton, TPopupBox, TMagnifierGlass, TPanel, TLabel, TCheckBox, TRadioButton, TGroupBox, TStatusBar, TToolBar, TProgressBar, and TTrackBar.
Setting their ControlType to Platform doesn’t make these platform-native, it just makes them work correctly with other platform native controls.
10.3 Rio is in beta (which means these features are subject to change) and available to update subscription customers. Once it is released you can learn more about all of these features in the DocWiki. Also, if you are already using Platform native ControlType on iOS or Windows then those control will take advantage of the Android Platform native ControlType right away!
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition