Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
CodeDelphiRAD Studio

Quickly Enable Smooth Sliding Effects Between Tabs In Delphi Apps For Android And iOS

The FMX.TabSlideTransition Sample adds dynamism to the use of tab sliding effects in mobile applications.

Location

You can find the TabSlideTransition sample project at:

  • Start | Programs | Embarcadero RAD Studio Sydney | Samples and navigate to:
    • Object PascalMulti-Device SamplesUser InterfaceTabSlideTransition
    • CPPMulti-Device SamplesUser InterfaceTabSlideTransition
  • Subversion Repository:
    • You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.

How to Use the Sample

  1. Navigate to the one of the locations given above, and open:
    • Delphi: TabSlidingProject.dproj
    • C++: TabSlidingProject.cbproj
  2. Press F9 or choose Run > Run.

Classes

TabSlideTransitionFrmBase represents the main window of the sample. It contains the following components:

Implementation

  • When you run the application, the first TabItem1 is displayed. Before going to any of the next tab items, all fields on the tab must be completed. Otherwise, the Next button is not Enabled.
  • On pressing the Next or Back buttons on the toolbar tab control, the NextTabAction or

PreviousTabAction tab switching actions are invoked.

  • To assign these actions to toolbar buttons, in the Structure view select a button, for example Next ({Code|Button1}}). In the Object Inspector, select the Action node, click the down arrow on the right, and assign New Standard Action > Tab > TNextTabAction to the Action property. To set the TabControl tab control in which to make switching of active tabs, in the Object Inspector, expand the Action node, select the TabControl item, and click the down arrow on the right. From the list, select the TabControl1 tab control.
  • To enable or disable the Keyboard Toolbar, the SetToolbarEnabled method is used.
  • The Keyboard Toolbar is implicitly hidden, appearing only when completing information in TEdit objects. Setting the visibility is achieved using the following method: SetHideKeyboardButtonVisibility.

You can refer to the link below for more information about this sample:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FMX.TabSlideTransition_Sample

Head over and check out the full source code for the FireMonkey tab sliding animation sample for Android and iOS on Embarcadero’s GitHub.

Do you want to build Smooth Sliding Effects Between Tabs for iOS and Android? Try the Cross-Platform Development tool, which will assist you in developing apps in the Delphi or C++ environments.


Coding Boot Camp

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Related posts
C++Code

The Advanced Guide To Lambda Expression In C++ Software

DelphiRAD Studio

Is React Native Dead? What Is The Best Alternative?

C++CodeIDERAD Studio

5 More Tips About Using Strings In Modern C++ Software

CodeDelphiHow-To'sTech Partner

How To Implement Push Notifications In Cross Platform Apps

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES