I have a list view that stretch to device width that shows a list of names, I need to make the label fit the total width, just like autofit. So if its a short name it should have max font to fit to view width or if its a long name the font size should decrease to fit the view width. Blackberry 10.2 has a autofit property on label that does this but I need it to support from 10.0. So is there any other alternative to do this?
This is my current definition of the label
Label {
id: myLabel
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Center
textStyle {
base: tsLabel.style
}
TextStyleDefinition {
id: tsLabel
base: SystemDefaults.TextStyles.BodyText
fontSize: FontSize.PointValue
fontSizeValue:14
color: Color.White
fontWeight: FontWeight.Bold
}