One of the more visible problems I've encountered with FM on iOS and Android is the transition between TabPages (TTabControl.SetActiveTabWithTransition). Even on an iPhone5 the frame rate is awful.

One of the more visible problems I've encountered with FM on iOS and Android is the transition between TabPages (TTabControl.SetActiveTabWithTransition). Even on an iPhone5 the frame rate is awful.

After looking at the tab transition code I realised that the problem was mainly caused by both tabs being redrawn for every frame of the animation. As many of you have realised by now FM controls start to paint slowly once you have more than a few child controls.

I have written an extension to TTabControl that caches the two tab pages before animating the transition. This greatly improves the frame rate. The component also accepts additional parameters that allow you to control the duration and type of animation along with a variable that sets how far the outgoing tab will move. There is currently an issue that may down to my lack of understaning of FMX bitmaps. It could also be an FMX bug - please take a look at this StackOverflow question for more info: http://stackoverflow.com/questions/19223152/firemonkey-tcontrol-makescreenshot-generates-an-unsersized-bitmap-on-mobile-plat

The tab control is hosted in a new project on Google Code: https://code.google.com/p/fmx-extensions/. I've added directories for both user interface components (UX) and API conversions (API). I'm hoping that this pĆ„roject can become a collection of FMX code. Please feel free to send me your submissions :)

Please let me know If you would like to join the project. I am also very open to suggestions on how to manage a project like this.
https://code.google.com/p/fmx-extensions/

Comments