0
클릭 here! 넥서스 5와 은하계의 핵심에 찍은 스크린 샷을 볼 수 ... 은하 코어에서 은, 모든 좋은 것처럼 보이지만 넥서스 5의 위젯 인해 내가 설정 한 ... 다른 화면 크기로 왼쪽으로 이동 얻을다른 화면 크기의 티타늄 합금 위젯 위치 지정 문제
<property name="ti.ui.defaultunit" type="string">dp</property>
내 tiapp.xml
내 xml 파일은 다음과 같다에서
...
<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>
---- 내 TSS 파일 ----
'#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: ''
},
012 3,516,
또한 % 만 같은 결과를 시도
내가 이일 과거부터 갇혀대로 도와주세요 여전히 해결책 ...
화면 크기가 다른데도 같은 위치에 요소를 배치하면 ... –
코드를 시험해보고 대답을 추가하십시오! – Jeroen
이것은 단지 요소 중심에 위치합니다 ... 화면의 높이가 더 큰 경우에는 어떻게합니까 ??? –