티타늄 어플리케이션에서 재사용하고 싶은 버튼 컨트롤러를 만들었습니다. 내 창 중 하나에서 createController를 사용하여 창에 추가합니다. 여태까지는 그런대로 잘됐다.티타늄 컨트롤러의 높이가 제어 할 수없는 것 같습니다
그러나 버튼의 높이가 전체 창에있는 것으로 보이며이를 변경하는 방법을 찾을 수 없습니다. 내가 뭘 놓치고 있니?
view button.xml
:
<Alloy>
<View id="generalButtonContainer">
<View id="generalButton" class="generalButton" onClick="callback" >
<Label class="generalButtonLabel" id="generalButtonLabel" />
<ImageView class="generalButtonIcon" />
</View>
</View>
</Alloy>
button.tss
: 내 파일 아래
Alloy.createController('button',{text: 'signup.button.continue'});
$.signupButtonContainer.add(buttonView.getView());
그리고 지금, 나는를 지정하더라도
".generalButton": {
height: 60,
borderRadius: 2,
backgroundColor: '#5ba7e6',
left: 10,
right: 10
}
".generalButtonLabel": {
color: '#ffffff',
font: {
fontSize: 16
},
left: 15
}
".generalButtonIcon": {
image: '/images/generic/arrow-thin-right-white.png',
height: 15,
width: 15,
top: 22,
right: 15
}
"#generalButtonContainer": {
width: 320,
height: Ti.UI.SIZE
}
그리고 여기 내 부모 창에 포함 높이 (부모 창에서도 signupButtonContainer
:)) 나는 전체 창 높이보기를 여전히 얻는다.
이 문제를 어떻게 해결합니까?
편집 : 누락 된 정보가있는 경우 그냥 물어보십시오! 많은 정보가 포함 된 복잡한 질문