Start screen - Exercise
Try to replicate the screen to the right by using layouts, image and buttons
horizontalAlignment: HorizontalAlignment.Fill / HorizontalAlignment.Center / HorizontalAlignment.Left / HorizontalAlignment.Right verticalAlignment: VerticalAlignment.Fill / VerticalAlignmentt.Center / VerticalAlignmentt.Left / VerticalAlignment.Right
41
Importing a project
42
QML Components
Group QML into Components Project overview Readable code Reusable code
43
QML Components – Exercise
New file: StartScreen.qml Move the content of your Page to StartScreen.qml (import bb.cascades in all QML files)
// file: main.qml import bb.cascades 1.0 Page { StartScreen {} }
44
High Score Screen
Label ListView ListItemComponents XmlDataModel
45
ListView
Highscore xml data model:
<root> <item name="Mattias" time="50000" moves="15"/> <item name="Olof" time="49800" moves="8"/> <item name="Shailesh" time="37500" moves="54"/> </root>