Smartface android 操作栏菜单图标更改
Smartface android actionbar menu icon change
我想更改标题左侧的菜单图标。我的代码如下。但我想我写错了代码。我该怎么做?
var leftitemm = new SMF.UI.Android.MenuItem({
id: "itemBack",
icon: "ico_submenu_back.png",
showAsAction: SMF.UI.Android.ShowAsAction.always,
onSelected: function(e) {
alert("Back item selected");
}
})
header.setLeftItem(leftitemm);
您可以通过添加以下行来更改左侧菜单项:“this.actionBar.homeAsUpIndicator = 'icon.png';”在 HeaderBar.js.
this.setLeftItem = function () {
if (this.isAndroid == true) {
this.actionBar.displayHomeAsUpEnabled = true;
this.actionBar.displayShowHomeEnabled = true;
this.actionBar.homeAsUpIndicator = "icon.png";
this.actionBar.onHomeIconItemSelected = function () {
alert("Home Button clicked");
}
} else{
...
}
}
我想更改标题左侧的菜单图标。我的代码如下。但我想我写错了代码。我该怎么做?
var leftitemm = new SMF.UI.Android.MenuItem({
id: "itemBack",
icon: "ico_submenu_back.png",
showAsAction: SMF.UI.Android.ShowAsAction.always,
onSelected: function(e) {
alert("Back item selected");
}
})
header.setLeftItem(leftitemm);
您可以通过添加以下行来更改左侧菜单项:“this.actionBar.homeAsUpIndicator = 'icon.png';”在 HeaderBar.js.
this.setLeftItem = function () {
if (this.isAndroid == true) {
this.actionBar.displayHomeAsUpEnabled = true;
this.actionBar.displayShowHomeEnabled = true;
this.actionBar.homeAsUpIndicator = "icon.png";
this.actionBar.onHomeIconItemSelected = function () {
alert("Home Button clicked");
}
} else{
...
}
}