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

leftNavButton and rightNavButton spacer appears if using backgroundImage ?

$
0
0

Hi,

I am trying to add custom buttons to the left and right navButton but a spacer seems to appear if I set a backgroundImage. If only the title text is set the spacing is correct. Here is my example to reproduce the issue, I added a borderColor to show that the image is not the culprit.

var win = Ti.UI.createWindow({
    width: '100%',
    height: '100%',
    backgroundColor: 'white'
});
var leftBtn = Ti.UI.createButton({
    backgroundImage:"/images/headerCmdMenu.png",
    width: '81px',
    height:'74px',
    title: 'left',
    borderColor: 'red',
    borderWidth: 1
});
var rightBtn = Ti.UI.createButton({
    width: '81px',
    height:'74px',
    title: 'right'
});
win.leftNavButton = leftBtn;
win.rightNavButton = rightBtn;
var nc =  Ti.UI.iOS.createNavigationWindow({
    window : win
});
nc.open();
Here is a screenshot of the view...

http://imagebin.ca/v/13wq8Jrn1hst

Any ideas how to fix this?

Thanks.

Chris


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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