summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Tizen/Native
diff options
context:
space:
mode:
authorSeungkeun Lee <sngn.lee@samsung.com>2017-02-06 04:41:42 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:29 (GMT)
commit408aa708a82b25e9114f38fb2a2113198eaf96c8 (patch)
treedee96e77b50b2eeb1e805a9f6ff8edf1853815d8 /Xamarin.Forms.Platform.Tizen/Native
parent2ab4229f2fd23e9ee7ab47d3d879aa96aff63559 (diff)
downloadxamarin-forms-408aa708a82b25e9114f38fb2a2113198eaf96c8.zip
xamarin-forms-408aa708a82b25e9114f38fb2a2113198eaf96c8.tar.gz
xamarin-forms-408aa708a82b25e9114f38fb2a2113198eaf96c8.tar.bz2
Refactoring Label Renderer
- Optimize FormattedText handling - Define a new Value of TextAlignment, LineBreakMode for default value - Old-version of Span used a wrong specific value of Alignement and LineBreakMode Change-Id: I78baded712ce18f279774b09608c2a2d19931a69
Diffstat (limited to 'Xamarin.Forms.Platform.Tizen/Native')
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/LineBreakMode.cs7
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/Span.cs15
-rw-r--r--Xamarin.Forms.Platform.Tizen/Native/TextAlignment.cs5
3 files changed, 23 insertions, 4 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Native/LineBreakMode.cs b/Xamarin.Forms.Platform.Tizen/Native/LineBreakMode.cs
index 27253ad..e8727f4 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/LineBreakMode.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/LineBreakMode.cs
@@ -6,6 +6,11 @@ namespace Xamarin.Forms.Platform.Tizen.Native
public enum LineBreakMode
{
/// <summary>
+ /// Follow base LineBreakMode.
+ /// </summary>
+ None,
+
+ /// <summary>
/// Do not wrap text.
/// </summary>
NoWrap,
@@ -38,6 +43,6 @@ namespace Xamarin.Forms.Platform.Tizen.Native
/// <summary>
/// Truncate the tail of text.
/// </summary>
- TailTruncation
+ TailTruncation,
}
}
diff --git a/Xamarin.Forms.Platform.Tizen/Native/Span.cs b/Xamarin.Forms.Platform.Tizen/Native/Span.cs
index 41a20b7..50d596a 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/Span.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/Span.cs
@@ -121,9 +121,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native
FontAttributes = FontAttributes.None;
ForegroundColor = EColor.Default;
BackgroundColor = EColor.Default;
- HorizontalTextAlignment = TextAlignment.Auto;
- VerticalTextAlignment = TextAlignment.Auto;
- LineBreakMode = LineBreakMode.MixedWrap;
+ HorizontalTextAlignment = TextAlignment.None;
+ VerticalTextAlignment = TextAlignment.None;
+ LineBreakMode = LineBreakMode.None;
Underline = false;
Strikethrough = false;
}
@@ -264,6 +264,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native
case TextAlignment.Center:
_formattingString.Append("align=center ");
break;
+
+ case TextAlignment.None:
+ break;
}
switch (VerticalTextAlignment)
@@ -280,6 +283,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native
case TextAlignment.Center:
_formattingString.Append("valign=middle ");
break;
+
+ case TextAlignment.None:
+ break;
}
switch (LineBreakMode)
@@ -311,6 +317,9 @@ namespace Xamarin.Forms.Platform.Tizen.Native
case LineBreakMode.TailTruncation:
_formattingString.Append("ellipsis=1.0");
break;
+
+ case LineBreakMode.None:
+ break;
}
return _formattingString;
diff --git a/Xamarin.Forms.Platform.Tizen/Native/TextAlignment.cs b/Xamarin.Forms.Platform.Tizen/Native/TextAlignment.cs
index c7e934b..33fa72b 100644
--- a/Xamarin.Forms.Platform.Tizen/Native/TextAlignment.cs
+++ b/Xamarin.Forms.Platform.Tizen/Native/TextAlignment.cs
@@ -6,6 +6,11 @@ namespace Xamarin.Forms.Platform.Tizen.Native
public enum TextAlignment
{
/// <summary>
+ /// Follow base TextAlignment
+ /// </summary>
+ None,
+
+ /// <summary>
/// Aligns horizontal text according to language. Top aligned for vertical text.
/// </summary>
Auto,