Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

actionbar image inconsistent behaviour in android

$
0
0

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';
            }

        }
    }
};

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>