2017-12-26 28 views
0

레이블을 이미지 위에 올려야합니다. 이 이미지는 레이아웃이 "수직"인보기에 있으며,이 LABEL을 이미지의 오른쪽 맨 위에 놓아야합니다. 어떻게해야합니까?Appcelerator : 레이아웃 레이아웃 세로로 레이블 레이아웃 합성

내 코드 :

index.html을

`<Alloy> 
     <View class="col col-2"> 
          <ImageView id="images" class="img-thumbnail" /> 
          <Label id="name"></Label> 
          <Label id="price"></Label> 
     </View> 
</Alloy> 
` 

    app.tss 

    ".col-2":{ 
     layout: 'vertical', 
     width: '49.25%', 
     height: Ti.UI.SIZE, 
    } 
    ".badge":{ 
    top:0, 
    right:0, 
    backgroundColor:'green', 
    color:'white', 
    layout:'composite' 
} 

합금. 티타늄 SDKA : 7.0.0.GA 당신이 수직 레이아웃의 다른보기와 함께 이미지 & 위의 오른쪽 상단에 라벨을 표시 할 경우에, 당신은 다른보기 & 쇼에 수직 레이아웃을 래핑 할 수

+0

당신이하고 싶은 것을 보여주는 스크린 샷을 보여줄 수 있습니까? –

답변

1

다음과 같이 오른쪽 상단의 이미지 :

<Alloy> 
    <View width="49.25%" height="Ti.UI.SIZE"> 

     <!-- now use full width on this view --> 
     <View class="col col-2" width="Ti.UI.FILL"> 
      <ImageView id="images" class="img-thumbnail" /> 
      <Label id="name"></Label> 
      <Label id="price"></Label> 
     </View> 

     <Label text="Put your top-right label here" width="Ti.UI.SIZE" height="Ti.UI.SIZE" top="16" right="16" /> 
    </View> 
</Alloy> 
+0

Thx Prashant !! 질문하기 전에 그 일을해야한다고 생각 했어야했습니다. – kurungele