summaryrefslogtreecommitdiffstats
path: root/examples/qmlandroid/catalog/qml/AwesomeView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qmlandroid/catalog/qml/AwesomeView.qml')
-rw-r--r--examples/qmlandroid/catalog/qml/AwesomeView.qml45
1 files changed, 45 insertions, 0 deletions
diff --git a/examples/qmlandroid/catalog/qml/AwesomeView.qml b/examples/qmlandroid/catalog/qml/AwesomeView.qml
new file mode 100644
index 0000000..3d1f707
--- /dev/null
+++ b/examples/qmlandroid/catalog/qml/AwesomeView.qml
@@ -0,0 +1,45 @@
+import android.view 0.21
+import android.widget 0.21
+import android.view.animation 0.21
+
+RelativeLayout {
+ ImageView {
+ imageResource: 2130837555 // TODO: R.drawable.awesome
+ RelativeLayout.centerInParent: true
+
+// animation: Animation {
+// id: anim
+// resource: 2130968582 // TODO: r.anim.awesome
+// }
+
+ animation: AnimationSet {
+ id: anim
+ shareInterpolator: false
+ ScaleAnimation {
+ duration: 4800
+ repeatMode: Animation.REVERSE
+ repeatCount: Animation.INFINITE
+ fromXScale: 0.5
+ fromYScale: 0.5
+ toXScale: 1.0
+ toYScale: 1.0
+ pivotX: 0.5 // "50%"
+ pivotY: 0.5 // "50%"
+ pivotXType: Animation.RELATIVE_TO_SELF
+ pivotYType: Animation.RELATIVE_TO_SELF
+ interpolator: AccelerateDecelerateInterpolator { }
+ }
+ RotateAnimation {
+ duration: 3200
+ repeatCount: Animation.INFINITE
+ fromDegrees: 0
+ toDegrees: -360
+ pivotX: 0.5 // "50%"
+ pivotY: 0.5 // "50%"
+ pivotXType: Animation.RELATIVE_TO_SELF
+ pivotYType: Animation.RELATIVE_TO_SELF
+ interpolator: LinearInterpolator { }
+ }
+ }
+ }
+}