Before you begin
You should have the following things ready:
- The BlackBerry 10 Native SDK
- Your BlackBerry 10 device
- A basic understanding of the C language and some experience running applications with the native SDK
Create your project
To get the Good Citizen application up and running, you need to create the appropriate project:
- In the Momentics IDE for BlackBerry, on the File menu, click New > Example.
- Click BlackBerry Example Project. Click Next.
- Select BlackBerry 10 OS Example Good Citizen Project. Click Next.
- Verify that you'd like to create the project in the default workspace, or clear the Use default location check box and select a different location for the project.
- Click Finish.
The project appears in the Project Explorer window in the IDE. To see the source files in the project, you can expand the project folder and then the src folder.
Using the application
In the Good Citizen example application, users control the color of the cube that appears on the screen by using the color menu. Users can interact with the application by tapping the radio buttons that appear to the left of the text. The current color of the cube is determined by which radio button is selected. The radio buttons are displayed using one of two .png files located in the project directory; one file shows a selected button and the other shows an unselected button. The background also uses a .png file that includes a shadow for the cube. These image assets are specified using the bar-descriptor.xml file in the project.
Swipe down from the top of the bezel.
The color menu appears on the screen.
Tap the radio buttons on the screen.
The color of the rotating cube changes and the selected radio button is highlighted.
Tap anywhere outside the radio buttons.
If the color menu is displayed, it will disappear.
Last modified: 2013-10-30