-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up third party and added cards
Signed-off-by: Brandyn A. White <bwhite@dappervision.com>
- Loading branch information
Brandyn A. White
committed
Mar 13, 2014
1 parent
49593c5
commit 7ad98f0
Showing
6 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
GDK Cards | ||
========= | ||
WearScript uses an abstraction called a CardTree that allows for a hierarchy of cards where a node can optionally have either a menu or another set of cards beneath it and every card can have a tap/select callback. The syntax is overloaded to make common functionality concise. | ||
|
||
The following displays a GDK card (consists of a body and footer) | ||
.. code-block:: javascript | ||
var tree = new WS.Cards(); | ||
tree.add('Body text', 'Footer text'); | ||
WS.cardTree(tree); | ||
WS.displayCardTree(); | ||
Lets add another card | ||
.. code-block:: javascript | ||
var tree = new WS.Cards(); | ||
tree.add('Body 0', 'Footer 0'); | ||
tree.add('Body 1', 'Footer 1'); | ||
WS.cardTree(tree); | ||
WS.displayCardTree(); | ||
Select and tap callbacks are optional arguments | ||
.. code-block:: javascript | ||
var tree = new WS.Cards(); | ||
tree.add('Body 0', 'Footer 0', function () {WS.say('Selected')}); | ||
tree.add('Body 1', 'Footer 1', undefined, function () {WS.say('Tapped')}); | ||
WS.cardTree(tree); | ||
WS.displayCardTree(); | ||
A menu is added with alternating title and callback arguments at the end of the parameter list. Tap/select parameters (if present) precede them. | ||
.. code-block:: javascript | ||
var tree = new WS.Cards(); | ||
tree.add('Body 0', 'Footer 0', 'Say 0', function () {WS.say('Say 0')}, 'Say 1', function () {WS.say('Say 1')}); | ||
tree.add('Body 1', 'Footer 1', function () {WS.say('Selected')}, 'Say 0', function () {WS.say('Say 0')}, 'Say 1', function () {WS.say('Say 1')}); | ||
tree.add('Body 2', 'Footer 2', function () {WS.say('Selected')}, function () {WS.say('Tapped')}, 'Say 0', function () {WS.say('Say 0')}, 'Say 1', function () {WS.say('Say 1')}); | ||
WS.cardTree(tree); | ||
WS.displayCardTree(); | ||
A subtree of cards is added by creating another set of cards and placing it as the last parameter (may only have a menu or a subtree for a card). There is no depth limit for subtrees. | ||
|
||
.. code-block:: javascript | ||
var tree = new WS.Cards(); | ||
tree.add('Body 0', 'Footer 0'); | ||
var subtree = new WS.Cards(); | ||
subtree.add('Sub Body 0', 'Sub Footer 0'); | ||
subtree.add('Sub Body 1', 'Sub Footer 1'); | ||
tree.add('Body 1', 'Footer 1', subtree); | ||
WS.cardTree(tree); | ||
WS.displayCardTree(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/env sh | ||
./adb/linux/adb install OpenCV_2.4.6_Manager_2.9_armv7a-neon.apk | ||
./adb/linux/adb install CaptureActivity.apk | ||
./adb/linux/adb install wearscript.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/env sh | ||
./adb/osx/adb install OpenCV_2.4.6_Manager_2.9_armv7a-neon.apk | ||
./adb/osx/adb install CaptureActivity.apk | ||
./adb/osx/adb install wearscript.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
adb\windows\adb.exe install OpenCV_2.4.6_Manager_2.9_armv7a-neon.apk | ||
adb\windows\adb.exe install CaptureActivity.apk | ||
adb\windows\adb.exe install wearscript.apk |
This file was deleted.
Oops, something went wrong.