Click here! to view the screen shot taken on nexus 5 and galaxy core... In galaxy core,everything appears good but in nexus 5 the widgets get shifted to the left due to different screen size... I have set
<property name="ti.ui.defaultunit" type="string">dp</property>
in my tiapp.xml
My xml file is as follows...
<Alloy>
<Window id='PreferenceScreen' >
<Button id='button_save' title="Save"/>
<Label id='label_my_project' >My project</Label>
<Label id='label_select_city' >
</Label>
<Label id='label_select_locality' >
</Label>
</Window>
</Alloy>
----my tss file----
'#label_my_project': {
top: '88',
left: '20',
width: '280',
backgroundColor: '#00aac1',
color: '#ffffff',
text: 'My Project',
textAlign: 'center',
font: {
fontSize: '25sp'
}
},
'#label_select_city[platform=android]': {
hintText: 'Select City'
},
'#label_select_city': {
top: '143',
left: '40',
width: '240',
font: {
fontSize: '20sp'
}
},
'#label_select_locality[platform=android]': {
hintText: 'Select Locality'
},
'#label_select_locality': {
top: '214',
left: '40',
width: '240',
font: {
fontSize: '20dpsp'
}
},
'#button_save': {
top: '293',
left: '58',
width: '200',
borderWidth: 1,
borderRadius: 5,
borderColor: '#fff',
backgroundColor: '#00aac1',
backgroundSelectedColor: '#fff',
color: '#ffffff',
selectedColor: '#00aac1',
textAlign: 'center',
font: {
fontSize: '20sp'
}
},
'#PreferenceScreen[platform=android]': {
fullscreen: false
},
'#PreferenceScreen': {
top: '0',
left: '0',
backgroundColor: '#00aac1',
navGroup: ''
},
I have also tried with % but same result
Please help as i have been stuck since past two days and still no solution...