1
我正在使用Titanium版本3.1.3和合金框架。我在我的應用程序中實施了操作欄;但在包含選項卡組的屏幕中,標題在操作欄中缺失。只有圖標顯示在其中。從這個 - https://jira.appcelerator.org/browse/TIMOB-11645,我可以看到,這是固定在SDK版本:3.1.0.v20130320190115。但是,我仍然無法弄清楚爲什麼。在ActionBar中設置標題 - 使用Tabgroups屏幕 - 鈦合金
我試圖通過這樣的代碼
var actionBar;
if (Ti.Platform.osname === "android") {
if (! $.tab.activity) {
Ti.API.error("Can't access action bar on a lightweight window.");
} else {
actionBar = $.tab.getActivity().actionBar;
if (actionBar) {
alert("true");
//actionBar.title = "TITLE";
actionBar.setTitle("TITLE");
}
}
}
請幫忙設置操作欄的標題。提前致謝!