diff --git a/CrossPlatformModules.csproj b/CrossPlatformModules.csproj index 62e95a62f..bb95f4f6c 100644 --- a/CrossPlatformModules.csproj +++ b/CrossPlatformModules.csproj @@ -189,6 +189,9 @@ Designer + + Designer + Designer @@ -229,6 +232,9 @@ Designer + + system-icons.xml + all.xml @@ -2098,7 +2104,7 @@ False - + - + \ No newline at end of file diff --git a/apps/action-bar-demo/pages/action-items-icon.ts b/apps/action-bar-demo/pages/action-items-icon.ts index 5b8d5cd19..49eff383f 100644 --- a/apps/action-bar-demo/pages/action-items-icon.ts +++ b/apps/action-bar-demo/pages/action-items-icon.ts @@ -1,9 +1,17 @@ -export function leftTap(args) { - console.log("Left item tapped!"); +export function searchTap(args) { + console.log("Search item tapped!"); } -export function rightTap(args) { - console.log("Right item tapped!"); +export function cameraTap(args) { + console.log("Camera item tapped!"); +} + +export function trashTap(args) { + console.log("Trash item tapped!"); +} + +export function iconTap(args) { + console.log("Icon item tapped!"); } export function popTap(args) { diff --git a/apps/action-bar-demo/pages/action-items-icon.xml b/apps/action-bar-demo/pages/action-items-icon.xml index d92e72c57..41e6d4232 100644 --- a/apps/action-bar-demo/pages/action-items-icon.xml +++ b/apps/action-bar-demo/pages/action-items-icon.xml @@ -2,9 +2,11 @@ - - - + + + + + diff --git a/apps/tests/ui/action-bar/action-bar-tests-common.ts b/apps/tests/ui/action-bar/action-bar-tests-common.ts index ef1a27e66..c7d956ee8 100644 --- a/apps/tests/ui/action-bar/action-bar-tests-common.ts +++ b/apps/tests/ui/action-bar/action-bar-tests-common.ts @@ -76,6 +76,58 @@ import actionBarModule = require("ui/action-bar"); // //``` // +// ## Displaying Platform-Specific System Icons on Action Items +//```XML +// +// +// +// +// +// +// +// +// +// +// ... +// +//``` +// +//### iOS +//Set `ios.systemIcon` to a number representing the iOS system item to be displayed. +//Use this property instead of `ActionItemBase.icon` if you want to diplsay a built-in iOS system icon. +//The value should be a number from the `UIBarButtonSystemItem` enumeration +//(https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIBarButtonItem_Class/#//apple_ref/c/tdef/UIBarButtonSystemItem) +//0: Done +//1: Cancel +//2: Edit +//3: Save +//4: Add +//5: FlexibleSpace +//6: FixedSpace +//7: Compose +//8: Reply +//9: Action +//10: Organize +//11: Bookmarks +//12: Search +//13: Refresh +//14: Stop +//15: Camera +//16: Trash +//17: Play +//18: Pause +//19: Rewind +//20: FastForward +//21: Undo +//22: Redo +//23: PageCurl +// +//### Android +//Set `android.systemIcon` the name of the system drawable resource to be displayed. +//Use this property instead of `ActionItemBase.icon` if you want to diplsay a built-in Android system icon. +//The value should be a string such as 'ic_menu_search' if you want to display the built-in Android Menu Search icon for example. +//For a full list of Android drawable names, please visit http://androiddrawables.com +// // export function test_actionItem_inherit_bindingContext() { diff --git a/apps/ui-tests-app/action-bar/system-icons.ts b/apps/ui-tests-app/action-bar/system-icons.ts new file mode 100644 index 000000000..ac77dc39d --- /dev/null +++ b/apps/ui-tests-app/action-bar/system-icons.ts @@ -0,0 +1,5 @@ +import frame = require("ui/frame"); + +export function navigate(args) { + frame.topmost().navigate("action-bar/clean"); +} \ No newline at end of file diff --git a/apps/ui-tests-app/action-bar/system-icons.xml b/apps/ui-tests-app/action-bar/system-icons.xml new file mode 100644 index 000000000..827b8bff1 --- /dev/null +++ b/apps/ui-tests-app/action-bar/system-icons.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + +