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");
}
}
}
请帮忙设置操作栏的标题。提前致谢!