Layout Appcelerator:视图中的标签布局组合布局垂直布局
我需要在图像上方贴上标签。这个图像是在一个布局为“垂直”的视图中,我需要这个标签把它放在图像的右上角,绝对位置。我该怎么做 我的代码: index.htmlLayout Appcelerator:视图中的标签布局组合布局垂直布局,layout,appcelerator,composite,Layout,Appcelerator,Composite,我需要在图像上方贴上标签。这个图像是在一个布局为“垂直”的视图中,我需要这个标签把它放在图像的右上角,绝对位置。我该怎么做 我的代码: index.html `<Alloy> <View class="col col-2"> <ImageView id="images" class="img-thumbnail" /> <La
`<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'
}
`
`
app.tss
“.col-2”:{
布局:“垂直”,
宽度:49.25%,
高度:Ti.UI.SIZE,
}
“.badge”:{
排名:0,
右:0,,
背景颜色:'绿色',
颜色:'白色',
布局:'composite'
}
合金。
Tianium SDKA:7.0.0.GA如果要在图像上方的右上角显示标签以及该垂直布局中的其他视图,则可以将垂直布局包装到不同的视图中,并在右上角显示图像,如下所示:
<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>
你能展示你想做什么的示例屏幕截图吗?Thx Prashant!!。我应该在问之前考虑一下