FMX.Mobile.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 FireMonkeyMobile TabSlideTransition sample project at:
- Start | Programs | Embarcadero RAD Studio XE8 | Samples and then navigate to either:
Object Pascal\Mobile Samples\User Interface\TabSlideTransition
CPP\Mobile Samples\User Interface\TabSlideTransition
- Subversion Repository for Delphi: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE8/Object%20Pascal/Mobile%20Samples/User%20Interface/TabSlideTransition
- Subversion Repository for C++: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE8/CPP/Mobile%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
See Also
- FireMonkey Application Design
- FireMonkey Application Platform
- iOS Mobile Application Development
- Mobile Tutorial: Using the Web Browser Component (iOS and Android)
- Troubleshooting: Cannot Deploy to the iOS Simulator
- Troubleshooting: Cannot Deploy to the iOS Device
- FMX.Mobile.KeyboardToolbar Sample
- FMX.Mobile.KeyboardTypes Sample