diff --git a/CrossPlatformModules.csproj b/CrossPlatformModules.csproj
index 9a47ba9ed..ad4f0f8ec 100644
--- a/CrossPlatformModules.csproj
+++ b/CrossPlatformModules.csproj
@@ -79,6 +79,7 @@
data-binding.xml
+
@@ -111,6 +112,7 @@
+
Designer
diff --git a/apps/tests/ui/action-bar/ActionBar_NumberAsText.ts b/apps/tests/ui/action-bar/ActionBar_NumberAsText.ts
new file mode 100644
index 000000000..f47a44149
--- /dev/null
+++ b/apps/tests/ui/action-bar/ActionBar_NumberAsText.ts
@@ -0,0 +1,5 @@
+import frame = require("ui/frame");
+
+export function buttonTap(args) {
+ frame.topmost().goBack();
+}
\ No newline at end of file
diff --git a/apps/tests/ui/action-bar/ActionBar_NumberAsText.xml b/apps/tests/ui/action-bar/ActionBar_NumberAsText.xml
new file mode 100644
index 000000000..af3c357ab
--- /dev/null
+++ b/apps/tests/ui/action-bar/ActionBar_NumberAsText.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
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 90a08f444..5dbf44889 100644
--- a/apps/tests/ui/action-bar/action-bar-tests-common.ts
+++ b/apps/tests/ui/action-bar/action-bar-tests-common.ts
@@ -4,6 +4,7 @@ import helper = require("../helper");
import builder = require("ui/builder");
import button = require("ui/button");
import PageModule = require("ui/page");
+import fs = require("file-system");
//
// # ActionBar
@@ -203,3 +204,24 @@ export function test_Setting_ActionItems_doesnt_thrown() {
helper.goBack();
}
}
+
+export function test_Setting_ActionItemsWithNumberAsText_doesnt_thrown() {
+
+ var gotException = false;
+
+ var moduleName = __dirname.substr(fs.knownFolders.currentApp().path.length);
+
+ try {
+ helper.navigateToModule(moduleName + "/ActionBar_NumberAsText");
+ }
+ catch (e) {
+ gotException = true;
+ }
+
+ try {
+ TKUnit.assert(!gotException, "Expected: false, Actual: " + gotException);
+ }
+ finally {
+ helper.goBack();
+ }
+}
\ No newline at end of file
diff --git a/ui/action-bar/action-bar.android.ts b/ui/action-bar/action-bar.android.ts
index b0648d32e..3ac29466c 100644
--- a/ui/action-bar/action-bar.android.ts
+++ b/ui/action-bar/action-bar.android.ts
@@ -197,7 +197,7 @@ export class ActionBar extends common.ActionBar {
menu.clear();
for (var i = 0; i < items.length; i++) {
var item = items[i];
- var menuItem = menu.add(android.view.Menu.NONE, i + ACTION_ITEM_ID_OFFSET, android.view.Menu.NONE, item.text);
+ var menuItem = menu.add(android.view.Menu.NONE, i + ACTION_ITEM_ID_OFFSET, android.view.Menu.NONE, item.text + "");
if (item.icon) {
var drawableOrId = getDrawableOrResourceId(item.icon, this._appResources);
if (drawableOrId) {
diff --git a/ui/action-bar/action-bar.ios.ts b/ui/action-bar/action-bar.ios.ts
index 95bd491e6..3cbb479a5 100644
--- a/ui/action-bar/action-bar.ios.ts
+++ b/ui/action-bar/action-bar.ios.ts
@@ -52,7 +52,7 @@ export class ActionBar extends common.ActionBar {
if (previousController) {
if (this.navigationButton) {
var tapHandler = TapBarItemHandlerImpl.new().initWithOwner(this.navigationButton);
- var barButtonItem = UIBarButtonItem.alloc().initWithTitleStyleTargetAction(this.navigationButton.text, UIBarButtonItemStyle.UIBarButtonItemStylePlain, tapHandler, "tap");
+ var barButtonItem = UIBarButtonItem.alloc().initWithTitleStyleTargetAction(this.navigationButton.text + "", UIBarButtonItemStyle.UIBarButtonItemStylePlain, tapHandler, "tap");
previousController.navigationItem.backBarButtonItem = barButtonItem;
}
else {
@@ -124,7 +124,7 @@ export class ActionBar extends common.ActionBar {
}
}
else {
- barButtonItem = UIBarButtonItem.alloc().initWithTitleStyleTargetAction(item.text, UIBarButtonItemStyle.UIBarButtonItemStylePlain, tapHandler, "tap");
+ barButtonItem = UIBarButtonItem.alloc().initWithTitleStyleTargetAction(item.text + "", UIBarButtonItemStyle.UIBarButtonItemStylePlain, tapHandler, "tap");
}
return barButtonItem;