forked from lubuwest/Friendiqa
v0.1
This commit is contained in:
parent
591d55f43a
commit
fb560b54b1
115 changed files with 5537 additions and 0 deletions
25
source-android/androidnative.pri/qml/AndroidNative/Toast.qml
Normal file
25
source-android/androidnative.pri/qml/AndroidNative/Toast.qml
Normal file
|
@ -0,0 +1,25 @@
|
|||
import QtQuick 2.0
|
||||
import AndroidNative 1.0
|
||||
|
||||
Item {
|
||||
/// The message that will be displayed when show() is called
|
||||
property string text: ''
|
||||
|
||||
/// If set to true, the toast duration will be long
|
||||
property bool longDuration: false
|
||||
|
||||
readonly property string m_TOAST_MESSAGE: "androidnative.Toast.showToast"
|
||||
|
||||
/// Displays the Toast with the current set text and duration
|
||||
function show() {
|
||||
SystemDispatcher.dispatch(m_TOAST_MESSAGE, {
|
||||
text: text,
|
||||
longLength: longDuration
|
||||
});
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
SystemDispatcher.loadClass("androidnative.Toast");
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue