Friendiqa/source-android/androidnative.pri/examples/androidnativeexample/Components.qml
2017-11-08 21:15:07 +01:00

63 lines
1.5 KiB
QML

import QtQuick 2.2
import QtQuick.Window 2.1
import QuickAndroid 0.1
import QuickAndroid.Styles 0.1
import "./theme"
Page {
objectName: "ComponentPage";
property var pages: [
{
name: "Image Picker",
demo: "imagePicker/ImagePickerDemo.qml",
description: "Pick photo via Java language binding"
},{
name: "Toast",
demo: "toast/ToastDemo.qml",
description: "Toast Demonstration"
},{
name: "Notification",
demo: "notification/NotificationDemo.qml",
description: "Demonstrate how to use SystemDispatcher to send notification"
},{
name: "Information",
demo: "info/InfoDemo.qml",
description: "Android System Information"
},{
name: "Status Bar",
demo: "statusbar/StatusBarDemo.qml",
description: "Config Status Bar"
}
];
actionBar: ActionBar {
id : actionBar
iconSource: A.drawable("ic_menu",Constants.black87)
title: "AndroidNative Component List"
showIcon: false
actionButtonEnabled: false
}
VisualDataModel {
id: visualDataModel
delegate: ListItem {
title: modelData.name
subtitle: modelData.description
onClicked: {
present(Qt.resolvedUrl(modelData.demo));
}
}
model: pages;
}
ListView {
anchors.fill: parent
model : visualDataModel
}
}