Screen transitions sample app
The screen transitions sample application demonstrates how to create custom transitions between two screens using the TransitionContext class.
The sample application demonstrates the following animations for transitioning between screens:
This file contains the following items:
This file contains the TransitionScreen constructor that creates a screen to display before the screen transition occurs.
This sample features the following classes:
This class provides methods for specifying the type and attributes for each screen transition.
The sample application displays a sequence of screens using the following transitions:
This transition displays or removes a screen by fading the screen in or out, respectively. The fading in effect occurs by varying the opacity level of the first screen from 0% to 100%. The second screen fades out by varying the opacity level from 100% to 0%.
This transition displays or removes a screen by sliding the screen on or off the display of the BlackBerry device. You can specify the direction in which the screen enters or leaves the display, as well as the style of the outgoing screen. The outgoing screen can be pushed off the display or an incoming screen can slide over the outgoing screen.
This transition displays or removes a screen by wiping the screen on or off the display. You can specify the direction in which the screen enters or leaves the display.
This transition displays or removes a screen by zooming in or out.
Install the sample app
Visit www.blackberry.com/go/screentransitionssample to download the sample application.
Extract the screentransitionsdemo.zip file.
On the taskbar, click Start > Programs > Research In Motion > BlackBerry JDE 5.0 > JDE.
Open the workspace that you want to add the sample application to.
In the workspace tree, right-click the project that you want to add the sample application to.
Click Add project to <workspace folder>.
In the Add project to <workspace> dialog box, navigate to the folder where you extracted the sample application.
Click the ScreenTransitionsDemo.jdp file.
The sample app is also available in github.
Run the sample app
In the workspace where you added the screentransitionsdemo project, right-click screentransitionsdemo.
Click Build project.
On the taskbar, click Start > Applications > Research in Motion > BlackBerry JDE 5.0 > Device Simulator.
On the Home screen of the BlackBerry Smartphone Simulator, click the Downloads folder.
Click the Screen Transitions Demo icon.