ArticleItem.qml Example File
rssnews/assets/ArticleItem.qml
import bb.cascades 1.0
Container {
property alias title : titleLabel.text
property alias pubDate : pubDateLabel.text
layout: DockLayout {}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/article_background.png"
}
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
layout: StackLayout {
orientation: LayoutOrientation.LeftToRight
}
Container {
topPadding: 10
leftPadding: 50
Label {
id: titleLabel
textStyle.base: SystemDefaults.TextStyles.BodyText
textStyle.color: Color.White
}
Label {
id: pubDateLabel
textStyle.base: SystemDefaults.TextStyles.SmallText
textStyle.color: Color.Gray
}
}
ImageView {
verticalAlignment: VerticalAlignment.Center
minWidth: 20
imageSource: "asset:///images/arrow.png"
}
}
}