Hii all, i have an actionbar code below. I added it in tabgroup object(self). it works fine. But sometimes actionbar image not display even when running application from studio to android (jelly bean version also tested it in other phone) image not display or sometimes it's appear when running application and if we minimize the app and after that view for next time sometimes it works fine and sometimes actionbar image disappear. Any solution of it ?
self.attachActionBarImage = function() {
if (Ti.Platform.osname === "android") {
if (!self.getActivity()) {
Ti.API.error("Can't access action bar on a
lightweight window.");
}
else {
actionBar = self.getActivity().actionBar;
if (actionBar) {
actionBar.backgroundImage = "/images/header.png";
actionBar.icon = '/images/blank.png';
}
}
}
};