我想更改标题左侧的菜单图标。我的代码如下。但我想我写错了代码。我该怎么做?
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);

答案 0 :(得分:0)
您可以通过添加该行来更改左侧菜单项:" 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{
...
}
}