[Problem][TNINE-5253][MusicPlayer] Text doesn't appear properly in giant font size
[Cause & Measure]
Cause : All TextLabel's view height is configured in context of Normal font
Measure : Adjusted all TextLabel's height for maximum font size
Change-Id: Idbb15adc7b67d635a830e1b044b630fe55a5242d
Signed-off-by: Md. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics <farhan.m1@samsung.com>
get => albumCount;\r
set\r
{\r
- string text = string.Equals(value, "1") ? " IDS_ALBUM" : "IDS_ALBUM";\r
+ string text = string.Equals(value, "1") ? "IDS_ALBUM" : "IDS_ALBUMS";\r
AlbumTitle = text;\r
SetProperty(ref albumCount, value);\r
}\r
{\r
textView = new View()\r
{\r
- HeightSpecification = 84.SpToPx(),\r
+ HeightSpecification = 108.SpToPx(),\r
WidthSpecification = (DeviceInfo.IsPortrait ? 748 : 564).SpToPx(),\r
BackgroundColor = Color.Transparent,\r
Layout = new LinearLayout()\r
titleLabel = new TextLabel()\r
{\r
WidthSpecification = LayoutParamPolicies.MatchParent,\r
- HeightSpecification = 48.SpToPx(),\r
+ HeightSpecification = 62.SpToPx(),\r
PixelSize = 32.SpToPx(),\r
FontFamily = "BreezeSans",\r
HorizontalAlignment = HorizontalAlignment.Begin,\r
subtitleLabel = new TextLabel()\r
{\r
WidthSpecification = LayoutParamPolicies.MatchParent,\r
- HeightSpecification = 36.SpToPx(),\r
+ HeightSpecification = 46.SpToPx(),\r
PixelSize = 24.SpToPx(),\r
FontFamily = "BreezeSans",\r
HorizontalAlignment = HorizontalAlignment.Begin,\r
additionalLabel = new TextLabel()\r
{\r
WidthSpecification = 108.SpToPx(),\r
- HeightSpecification = 36.SpToPx(),\r
+ HeightSpecification = 46.SpToPx(),\r
PixelSize = 24.SpToPx(),\r
FontFamily = "BreezeSans",\r
VerticalAlignment = VerticalAlignment.Center,\r
StyleName = "LabelText",\r
ThemeChangeSensitive = true,\r
WidthSpecification = (DeviceInfo.IsPortrait ? 508 : 640).SpToPx(),\r
- HeightSpecification = 36.SpToPx(),\r
+ HeightSpecification = 46.SpToPx(),\r
PixelSize = 24.SpToPx(),\r
FontFamily = "BreezeSans",\r
HorizontalAlignment = HorizontalAlignment.Center,\r
TextLabel titleLabel = new TextLabel()
{
StyleName = "ItemLabel",
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
{
titleLabel = new TextLabel()
{
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 62.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
extraLabel = new TextLabel()
{
WidthSpecification = 160.SpToPx(),
- HeightSpecification = 36.SpToPx(),
+ HeightSpecification = 46.SpToPx(),
PixelSize = 24.SpToPx(),
FontFamily = "BreezeSans",
VerticalAlignment = VerticalAlignment.Center,
TextLabel textLabel = new TextLabel()
{
StyleName = "TitleText",
- Size2D = new Size2D(234, 36).SpToPx(),
+ Size2D = new Size2D(290, 62).SpToPx(),
TranslatableText = "IDS_NO_ITEMS_IN_FOLDER",
PixelSize = 24.SpToPx(),
FontFamily = "BreezeSans",
TextLabel textLabel = new TextLabel()
{
StyleName = "TitleText",
- Size2D = new Size2D(234, 36).SpToPx(),
+ Size2D = new Size2D(234, 62).SpToPx(),
TranslatableText = "IDS_NO_ITEMS_IN_FOLDER",
PixelSize = 24.SpToPx(),
FontFamily = "BreezeSans",
backButton = null;
moreButton = null;
searchButton = null;
+ UpdateTopViewHeightForFontSize(Tizen.System.SystemSettings.FontSize);
+ Tizen.System.SystemSettings.FontSizeChanged += FontSizeEventHandler;
+ }
+
+
+ private void FontSizeEventHandler(object sender, Tizen.System.FontSizeChangedEventArgs e)
+ {
+ UpdateTopViewHeightForFontSize(e.Value);
+ }
+
+ public void UpdateTopViewHeightForFontSize(Tizen.System.SystemSettingsFontSize fontSize)
+ {
+ if (fontSize == Tizen.System.SystemSettingsFontSize.Small)
+ {
+ topView.HeightSpecification = 115.SpToPx();
+ }
+ else if (fontSize == Tizen.System.SystemSettingsFontSize.Normal)
+ {
+ topView.HeightSpecification = 120.SpToPx();
+ }
+ else if(fontSize == Tizen.System.SystemSettingsFontSize.Large)
+ {
+ topView.HeightSpecification = 125.SpToPx();
+ }
+ else if (fontSize == Tizen.System.SystemSettingsFontSize.Huge)
+ {
+ topView.HeightSpecification = 130.SpToPx();
+ }
+ else if (fontSize == Tizen.System.SystemSettingsFontSize.Giant)
+ {
+ topView.HeightSpecification = 135.SpToPx();
+ }
}
public void resetTitleLabel( bool backButtonShown)
{
if (topView != null)
{
+ Tizen.System.SystemSettings.FontSizeChanged -= FontSizeEventHandler;
List<View> children = topView.Children;
foreach (View child in children)
{
Add(itemSeperator);\r
RelativeLayout.SetVerticalAlignment(itemSeperator, RelativeLayout.Alignment.End);\r
\r
+ UpdateTextViewHeightForFontSize(Tizen.System.SystemSettings.FontSize);\r
+\r
ThemeManager.ThemeChanged += OnThemeUpdated;\r
+ Tizen.System.SystemSettings.FontSizeChanged += FontSizeEventhandler;\r
+ }\r
+\r
+ private void FontSizeEventhandler(object o, Tizen.System.FontSizeChangedEventArgs e)\r
+ {\r
+ UpdateTextViewHeightForFontSize(e.Value);\r
+ }\r
+\r
+ public void UpdateTextViewHeightForFontSize(Tizen.System.SystemSettingsFontSize fontSize)\r
+ {\r
+ int textViewHeight = 82;\r
+ int increment = 3;\r
+ if (fontSize == Tizen.System.SystemSettingsFontSize.Normal)\r
+ {\r
+ textViewHeight += 1 * increment;\r
+ }\r
+ else if (fontSize == Tizen.System.SystemSettingsFontSize.Large)\r
+ {\r
+ textViewHeight += 2 * increment;\r
+ }\r
+ else if (fontSize == Tizen.System.SystemSettingsFontSize.Huge)\r
+ {\r
+ textViewHeight += 3 * increment;\r
+ }\r
+ else if (fontSize == Tizen.System.SystemSettingsFontSize.Giant)\r
+ {\r
+ textViewHeight += 6 * increment;\r
+ }\r
+ textView.HeightSpecification = textViewHeight.SpToPx();\r
+ titleLabel.HeightSpecification = (textViewHeight * 4 / 7).SpToPx();\r
+ subtitleView.HeightSpecification = (textViewHeight * 3 / 7).SpToPx();\r
+\r
}\r
\r
void AddSubtitlelabels()\r
{\r
TextLabel Label = new TextLabel()\r
{\r
- HeightSpecification = 36.SpToPx(),\r
+ HeightSpecification = LayoutParamPolicies.MatchParent,\r
PixelSize = 24.SpToPx(),\r
FontFamily = "BreezeSans",\r
HorizontalAlignment = HorizontalAlignment.Begin,\r
}\r
if (type == DisposeTypes.Explicit)\r
{\r
+ Tizen.System.SystemSettings.FontSizeChanged -= FontSizeEventhandler;\r
ThemeManager.ThemeChanged -= OnThemeUpdated;\r
Remove(itemSeperator);\r
itemSeperator?.Dispose();\r
VerticalAlignment = VerticalAlignment.Center,
},
BackgroundColor = Color.Transparent,
- HeightSpecification = 76.SpToPx(),
+ HeightSpecification = 108.SpToPx(),
WidthSpecification = DeviceInfo.IsPortrait ? Window.Instance.Size.Width - 64.SpToPx() : (int)((Window.Instance.Size.Width - 128.SpToPx()) * 0.65f),
};
baseView.Add(leftView);
{
LinearOrientation = LinearLayout.Orientation.Vertical,
},
- HeightSpecification = 76.SpToPx(),
+ HeightSpecification = LayoutParamPolicies.MatchParent,
WidthResizePolicy = ResizePolicyType.FillToParent,
Margin = (DeviceInfo.IsPortrait ? new Extents(24, 0, 0, 0) : new Extents(30, 0, 0, 0)).SpToPx(),
};
StyleName = "TitleText",
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 62.SpToPx(),
PixelSize = 36.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
StyleName = "TitleText",
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 28.SpToPx(),
+ HeightSpecification = 46.SpToPx(),
PixelSize = 19.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
StyleName = "LabelText",
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
FontStyle = UIFontStyles.AllNormal,
StyleName = "LabelText",
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
FontStyle = UIFontStyles.NormalLight,
StyleName = "LabelText",
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = ModifySize(48).SpToPx(),
+ HeightSpecification = ModifySize(64).SpToPx(),
PixelSize = ModifySize(36).SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Center,
StyleName = "LabelText",
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = ModifySize(36).SpToPx(),
+ HeightSpecification = ModifySize(46).SpToPx(),
PixelSize = ModifySize(24).SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Center,
{
StyleName = "LabelText",
ThemeChangeSensitive = true,
- Size2D = new Size2D(ModifySize(400), ModifySize(32)).SpToPx(),
+ Size2D = new Size2D(ModifySize(400), ModifySize(46)).SpToPx(),
PixelSize = ModifySize(24).SpToPx(),
FontFamily = "BreezeSans",
Text = "00::00:00",
{
StyleName = "LabelText",
ThemeChangeSensitive = true,
- Size2D = new Size2D(ModifySize(400), ModifySize(32)).SpToPx(),
+ Size2D = new Size2D(ModifySize(400), ModifySize(46)).SpToPx(),
PixelSize = ModifySize(24).SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.End,
FontStyle = UIFontStyles.NormalLight,
TranslatableText = "IDS_ADD_PLAYLIST_NAME",
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
HorizontalAlignment = HorizontalAlignment.Center,
};
return contentLabel;
{
StyleName = "PageLabel",
ThemeChangeSensitive = true,
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 62.SpToPx(),
TranslatableText = "IDS_SEARCH",
PixelSize = 36.SpToPx(),
FontFamily = "BreezeSans",
{
StyleName = "TitleText",
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 36.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
TranslatableText = "IDS_NO_RESULT_FOUND",
PixelSize = 24.SpToPx(),
FontFamily = "BreezeSans",
textView = new View()
{
BackgroundColor = Color.Transparent,
- HeightSpecification = 84.SpToPx(),
+ HeightSpecification = 108.SpToPx(),
Layout = new LinearLayout()
{
LinearOrientation = LinearLayout.Orientation.Vertical,
{
StyleName = "ItemLabel",
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 62.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
subtitleView = new View()
{
BackgroundColor = Color.Transparent,
- HeightSpecification = 36.SpToPx(),
+ HeightSpecification = 46.SpToPx(),
WidthSpecification = LayoutParamPolicies.MatchParent,
Layout = new LinearLayout()
{
{
TextLabel Label = new TextLabel()
{
- HeightSpecification = 36.SpToPx(),
+ HeightSpecification = LayoutParamPolicies.MatchParent,
PixelSize = 24.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
selectedCountLabel = new TextLabel()
{
StyleName = "TitleText",
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
selectedCountLabel2 = new TextLabel()
{
StyleName = "TitleText",
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
{
StyleName ="LabelText",
TranslatableText = "IDS_SELECT_ALL",
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
PixelSize = 32.SpToPx(),
FontFamily = "BreezeSans",
HorizontalAlignment = HorizontalAlignment.Begin,
View textArea = new View()
{
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 84.SpToPx(),
+ HeightSpecification = 100.SpToPx(),
Layout = new LinearLayout()
{
LinearOrientation = LinearLayout.Orientation.Vertical,
{
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 48.SpToPx(),
+ HeightSpecification = 56.SpToPx(),
PixelSize = 32.SpToPx(),
StyleName = "DetailTitle",
FontStyle = UIFontStyles.NormalLight,
{
ThemeChangeSensitive = true,
WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = 36.SpToPx(),
+ HeightSpecification = 44.SpToPx(),
StyleName = "DetailSubTitle",
FontStyle = UIFontStyles.AllNormal,
HorizontalAlignment = HorizontalAlignment.Begin,