Problem Description
When you are specifying the left or right of a button, you can use fractional percentages in iOS or Android. On MobileWeb, it fails.
Actual Results
The buttons are broken if using fractional percentages. Should work as in iOS.
Expected Results
Working as nice as in iOS.
Test Case
1. Create mobile project.
2. Paste app.js:
var win1 = Titanium.UI.createWindow({backgroundColor:'#FFFFFF'});
var mView = Ti.UI.createView({
top:20,
height:90,
backgroundColor:'#000'
});
var bar1 = Ti.UI.createButton({
height : 41,
left : '5%',
right : '52.5%',//'52.5%'
title : 'Reset',
visible : true,
backgroundImage : '/KS_nav_ui.png',
font : {
fontSize : 16,
fontWeight : 'bold',
fontFamily : 'Helvetica Neue',
fontColor:'black',
},
color : '#FFFFFF'
});
var bar2 = Ti.UI.createButton({
height : 41,
left : '52.5%',//'52.5%'
right : '5%',
title : 'continue',
visible : true,
backgroundImage : '/KS_nav_ui.png',
font : {
fontSize : 16,
fontWeight : 'bold',
fontFamily : 'Helvetica Neue'
},
color : '#FFFFFF'
});
mView.add(bar1);
mView.add(bar2);
win1.add(mView)
win1.open();
3. Run it in ios.
4. Run it in mobile web
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2380
Verified the issue on the environment below & found that the buttons are appearing as expected in IOS. Titanium Studio : 2.1.0.201206251749 SDK version : 2.1.0.v20120626104306 Chrome : 19.0.1084.56