FMX.TabSlideTransition Sample
This is a sample that illustrates how to add dynamism to use tab sliding effects in mobile applications, using FireMonkey.
Location
You can find the You can find the ' sample project at:
- Start | Programs | Embarcadero RAD Studio 10 Seattle | Samples and navigate to:
Object Pascal\Multi-Device Samples\User Interface\TabSlideTransition
CPP\Multi-Device Samples\User Interface\TabSlideTransition
- Subversion Repository:
- http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Seattle/Object%20Pascal/Multi-Device%20Samples/User%20Interface/TabSlideTransition
- http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RADStudio_Seattle/CPP/Multi-Device%20Samples/User%20Interface/TabSlideTransition
How to Use the Sample
- Navigate to the one of the locations given above, and open:
- Delphi: TabSlidingProject.dproj
- C++: TabSlidingProject.cbproj
- Press F9 or choose Run > Run.
Files
File | Contains |
---|---|
TabSlideTransitionBase.pas |
The base class for displaying the visual components. |
TabSlideTransition_iPad.pas |
Inherits TabSlideTransitionBase. It is the class for displaying visual components on the iPad. |
TabSlideTransition_iPhone5.pas |
Inherits TabSlideTransitionBase. It is the class for displaying visual components on the iPhone 5. |
Classes
TabSlideTransitionBase represents the main window of the sample. It contains the following components:
- A TActionList object.
- Eight TChangeTabAction objects.
- A TGestureManager object.
- A TTabControl object with five TTabItem objects.
- The first tab item contains:
- The second tab item contains:
- Four TEdit objects.
- A TCalendarEdit object.
- Seven TLabel objects.
- A TToolBar object.
- Two TButton objects.
- The third tab item contains:
- The fourth tab item contains:
- The last tab item contains:
Implementation
- When you run the application, the first TTabItem is displayed. Before going to any of the next TTabItem, all fields must be completed on the previous tabs. Otherwise, the Next button is not Enabled.
- On pressing the Next or Back buttons on the form, a TChangeTabAction is invoked.
- 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.
Uses
- FMX.VirtualKeyboard.IFMXVirtualKeyboardToolbarService.SetToolbarEnabled
- FMX.VirtualKeyboard.IFMXVirtualKeyboardToolbarService.SetHideKeyboardButtonVisibility