Commit 0ed846a0c13208e3e21d11a89b359350d00ba6c7
1 parent
26c9e247
Use new touch signal & image-view URL specified as a string
Change-Id: Ied59238560a6e49f4ed60b437a0225cf07e425ea
Showing
2 changed files
with
9 additions
and
21 deletions
resources/scripts/animation.json
| @@ -92,7 +92,7 @@ | @@ -92,7 +92,7 @@ | ||
| 92 | "size": [200, 200, 1], | 92 | "size": [200, 200, 1], |
| 93 | "orientation": [0, 0, 30], | 93 | "orientation": [0, 0, 30], |
| 94 | "signals": [{ | 94 | "signals": [{ |
| 95 | - "name": "touched", | 95 | + "name": "touch", |
| 96 | "action": "play", | 96 | "action": "play", |
| 97 | "animation": "animate" | 97 | "animation": "animate" |
| 98 | }] | 98 | }] |
| @@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
| 106 | "position": [-150, -50, 0], | 106 | "position": [-150, -50, 0], |
| 107 | "text": "or me", | 107 | "text": "or me", |
| 108 | "signals": [{ | 108 | "signals": [{ |
| 109 | - "name": "touched", | 109 | + "name": "touch", |
| 110 | "action": "play", | 110 | "action": "play", |
| 111 | "animation": "pathAnimation" | 111 | "animation": "pathAnimation" |
| 112 | }] | 112 | }] |
| @@ -119,14 +119,12 @@ | @@ -119,14 +119,12 @@ | ||
| 119 | }, { | 119 | }, { |
| 120 | "name": "image", | 120 | "name": "image", |
| 121 | "type": "ImageView", | 121 | "type": "ImageView", |
| 122 | - "image": { | ||
| 123 | - "url": "{DEMO_IMAGE_DIR}gallery-large-21.jpg" | ||
| 124 | - }, | 122 | + "image": "{DEMO_IMAGE_DIR}gallery-large-21.jpg", |
| 125 | "relayoutEnabled": false, | 123 | "relayoutEnabled": false, |
| 126 | "position": [0, 200, 0], | 124 | "position": [0, 200, 0], |
| 127 | "size": [200, 200, 1], | 125 | "size": [200, 200, 1], |
| 128 | "signals": [{ | 126 | "signals": [{ |
| 129 | - "name": "touched", | 127 | + "name": "touch", |
| 130 | "action": "play", | 128 | "action": "play", |
| 131 | "animation": "rotate" | 129 | "animation": "rotate" |
| 132 | }], | 130 | }], |
resources/scripts/table-view.json
| @@ -65,9 +65,7 @@ | @@ -65,9 +65,7 @@ | ||
| 65 | "name":"gallery1", | 65 | "name":"gallery1", |
| 66 | "type":"ImageView", | 66 | "type":"ImageView", |
| 67 | "heightResizePolicy":"FILL_TO_PARENT", | 67 | "heightResizePolicy":"FILL_TO_PARENT", |
| 68 | - "image": { | ||
| 69 | - "url": "{DEMO_IMAGE_DIR}gallery-small-1.jpg" | ||
| 70 | - }, | 68 | + "image": "{DEMO_IMAGE_DIR}gallery-small-1.jpg", |
| 71 | "properties": { // properties registered dynamically | 69 | "properties": { // properties registered dynamically |
| 72 | "cellIndex": [0,0], // property to specify the top-left cell this child occupies | 70 | "cellIndex": [0,0], // property to specify the top-left cell this child occupies |
| 73 | "rowSpan":4, // property to specify how many rows this child occupies, if not set, default value is 1 | 71 | "rowSpan":4, // property to specify how many rows this child occupies, if not set, default value is 1 |
| @@ -77,9 +75,7 @@ | @@ -77,9 +75,7 @@ | ||
| 77 | "name":"gallery2", | 75 | "name":"gallery2", |
| 78 | "type":"ImageView", | 76 | "type":"ImageView", |
| 79 | "heightResizePolicy":"FILL_TO_PARENT", | 77 | "heightResizePolicy":"FILL_TO_PARENT", |
| 80 | - "image": { | ||
| 81 | - "url": "{DEMO_IMAGE_DIR}gallery-small-2.jpg" | ||
| 82 | - }, | 78 | + "image": "{DEMO_IMAGE_DIR}gallery-small-2.jpg", |
| 83 | "properties": { // properties registered dynamically | 79 | "properties": { // properties registered dynamically |
| 84 | "cellIndex": [0,1], | 80 | "cellIndex": [0,1], |
| 85 | "cellHorizontalAlignment": "right" // property to specify how to align horizontally inside the cells, if not set, default value is 'left' | 81 | "cellHorizontalAlignment": "right" // property to specify how to align horizontally inside the cells, if not set, default value is 'left' |
| @@ -87,9 +83,7 @@ | @@ -87,9 +83,7 @@ | ||
| 87 | },{ | 83 | },{ |
| 88 | "name":"gallery3", | 84 | "name":"gallery3", |
| 89 | "type":"ImageView", | 85 | "type":"ImageView", |
| 90 | - "image": { | ||
| 91 | - "url": "{DEMO_IMAGE_DIR}gallery-small-3.jpg" | ||
| 92 | - }, | 86 | + "image": "{DEMO_IMAGE_DIR}gallery-small-3.jpg", |
| 93 | "properties": { | 87 | "properties": { |
| 94 | "cellIndex":[1,1], | 88 | "cellIndex":[1,1], |
| 95 | "rowSpan":3, | 89 | "rowSpan":3, |
| @@ -100,9 +94,7 @@ | @@ -100,9 +94,7 @@ | ||
| 100 | "name":"gallery4", | 94 | "name":"gallery4", |
| 101 | "type":"ImageView", | 95 | "type":"ImageView", |
| 102 | "widthResizePolicy":"FILL_TO_PARENT", | 96 | "widthResizePolicy":"FILL_TO_PARENT", |
| 103 | - "image": { | ||
| 104 | - "url": "{DEMO_IMAGE_DIR}gallery-small-4.jpg" | ||
| 105 | - }, | 97 | + "image": "{DEMO_IMAGE_DIR}gallery-small-4.jpg", |
| 106 | "properties": { | 98 | "properties": { |
| 107 | "cellIndex":[2,2] | 99 | "cellIndex":[2,2] |
| 108 | } | 100 | } |
| @@ -111,9 +103,7 @@ | @@ -111,9 +103,7 @@ | ||
| 111 | "type":"ImageView", | 103 | "type":"ImageView", |
| 112 | "widthResizePolicy":"FILL_TO_PARENT", | 104 | "widthResizePolicy":"FILL_TO_PARENT", |
| 113 | "heightResizePolicy":"FILL_TO_PARENT", | 105 | "heightResizePolicy":"FILL_TO_PARENT", |
| 114 | - "image": { | ||
| 115 | - "url": "{DEMO_IMAGE_DIR}gallery-small-5.jpg" | ||
| 116 | - }, | 106 | + "image": "{DEMO_IMAGE_DIR}gallery-small-5.jpg", |
| 117 | "properties": { | 107 | "properties": { |
| 118 | "cellIndex":[3,2], | 108 | "cellIndex":[3,2], |
| 119 | "columnSpan": 2 | 109 | "columnSpan": 2 |