main.qml Example File
nfcreceiver/assets/main.qml
import bb.cascades 1.0
Page {
Container {
layout: DockLayout {}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}
ListView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
dataModel: _nfcReceiver.messageRecords
listItemComponents: [
ListItemComponent {
type: ""
Container {
preferredWidth: 768
leftPadding: 10
rightPadding: 10
Field {
title: qsTr("tnf type")
value: ListItemData.tnfType == "0" ? qsTr("Empty Tag") :
ListItemData.tnfType == "1" ? qsTr("Well Known Type") :
ListItemData.tnfType == "2" ? qsTr("Media (MIME)") :
ListItemData.tnfType == "3" ? qsTr("Uri") :
ListItemData.tnfType == "4" ? qsTr("External") : ""
}
Field {
title: qsTr("record type")
value: ListItemData.recordType == "Sp" ? qsTr("Smart Poster") :
ListItemData.recordType == "T" ? qsTr("Text") :
ListItemData.recordType == "U" ? qsTr("Uri") :
ListItemData.recordType == "Gc" ? qsTr("Generic Control") :
ListItemData.recordType == "Hr" ? qsTr("Handover Request") :
ListItemData.recordType == "Hs" ? qsTr("Handover Select") :
ListItemData.recordType == "Hc" ? qsTr("Handover Carrier") :
ListItemData.recordType == "Sig" ? qsTr("Signature") : ""
}
Field {
title: qsTr("payload")
value: ListItemData.payload
}
Field {
title: qsTr("hex")
value: ListItemData.hexPayload
}
}
}
]
}
}
}