필자가 올바르게 라이닝하는 문제를 해결하기 위해 수행 한 작업은보기를 작성한 다음 상단/왼쪽 위치 지정을 사용하여 개별 요소를 추가하는 것이 었습니다.
var summary_win2 = Titanium.UI.createView({
height: '50%',
top: 0
});
// summary_win2.add(summary_win2_label0);
// I did the above code for all the elements below
var summary_win2_label0 = Titanium.UI.createLabel({
text: "Data 1",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 0,
left:3
});
var summary_win2_data0 = Titanium.UI.createLabel({
text: "0",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 0,
left:120
});
var summary_win2_label1 = Titanium.UI.createLabel({
text: "Data 2",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 25,
left:3
});
var summary_win2_data1 = Titanium.UI.createLabel({
text: "0",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 25,
left:120
});
var summary_win2_label2 = Titanium.UI.createLabel({
text:"Data 3",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 50,
left:3
});
var summary_win2_data2 = Titanium.UI.createLabel({
text: "0",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 50,
left:120
});
var summary_win2_label3 = Titanium.UI.createLabel({
text: "Data 4",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 75,
left:3
});
var summary_win2_data3 = Titanium.UI.createLabel({
text: "0",
font:{fontSize:24,fontWeight:'normal'},
color:'#000',
top: 75,
left:120
});
var buttonClear_win2 = Titanium.UI.createButton({
title: 'Clear',
top: 110,
width: 100,
height: 50,
left: 0
});
오타가 잘못되었습니다. 불행히도, 나는 그것이 코드 문제라고 생각하지 않습니다. 비례 글꼴이있는 문자열은 정렬되지 않습니다. – Jocala
나는 그것을 고쳤다. 컨테이너로 createview를 사용하고 요약 라인 레이블을 왼쪽과 같이 설정했습니다. 도와 줘서 고맙다. 내가 한 일을 보여주는 (간략한) 코드를 게시해야합니까? – Jocala
네, 혼자서 알아 낸 경우 자신의 질문에 대한 답변을 게시 할 수 있습니다. 보관 된 질문을 통해 비슷한 문제를 가진 다른 사람에게 도움이 될 수 있습니다. – daniula