I am developing an app in Titanium sdk 1.8.1and in this app I just create button with image but in android image is not display and its work fine iPhone. For android I have created folders high,low and medium inside resources folder so please give me idea how can i do that functionality.
var isAndroid = false;
if (Titanium.Platform.name == 'android')
{
isAndroid = true;
}
var addFriendButton = Ti.UI.createButton
({
font:
{
fontFamily:'Helvetica Neue',
fontSize:'15dp'
},
top:'20dp',
left:'235dp',
height:'22dp',
width:'110dp',
isButton:true
});
if(isAndroid)
{
addFriendButton.backgroundImage = '../images/addfriend.png';
}
else
{
addFriendButton.backgroundImage = path + '/Images/addfriend.png';
}
Thanks in advance.