28
28
29
29
using Windows . Foundation ;
30
30
using Windows . UI . Xaml . Input ;
31
+ using Uno . Collections ;
31
32
32
33
namespace Windows . UI . Xaml . Controls
33
34
{
@@ -48,6 +49,11 @@ public partial class TextBlock : FrameworkElement
48
49
}
49
50
50
51
private readonly static TextUtils . TruncateAt TruncateEnd = TextUtils . TruncateAt . End ;
52
+
53
+ private readonly static Layout . Alignment LayoutAlignCenter = Android . Text . Layout . Alignment . AlignCenter ;
54
+ private readonly static Layout . Alignment LayoutAlignOpposite = Android . Text . Layout . Alignment . AlignOpposite ;
55
+ private readonly static Layout . Alignment LayoutAlignNormal = Android . Text . Layout . Alignment . AlignNormal ;
56
+
51
57
private readonly static Java . Lang . String EmptyString = new Java . Lang . String ( ) ;
52
58
private static Java . Lang . Reflect . Constructor _maxLinedStaticLayout ;
53
59
private static Java . Lang . Object _textDirectionHeuristics ;
@@ -175,21 +181,21 @@ private void UpdateLayoutAlignment()
175
181
switch ( TextAlignment )
176
182
{
177
183
case TextAlignment . Center :
178
- _layoutAlignment = Android . Text . Layout . Alignment . AlignCenter ;
184
+ _layoutAlignment = LayoutAlignCenter ;
179
185
_justificationMode = JustificationMode . None ;
180
186
break ;
181
187
182
188
case TextAlignment . Right :
183
- _layoutAlignment = Android . Text . Layout . Alignment . AlignOpposite ;
189
+ _layoutAlignment = LayoutAlignOpposite ;
184
190
_justificationMode = JustificationMode . None ;
185
191
break ;
186
192
case TextAlignment . Justify :
187
- _layoutAlignment = Android . Text . Layout . Alignment . AlignNormal ;
193
+ _layoutAlignment = LayoutAlignNormal ;
188
194
_justificationMode = JustificationMode . InterWord ;
189
195
break ;
190
196
default :
191
197
case TextAlignment . Left :
192
- _layoutAlignment = Android . Text . Layout . Alignment . AlignNormal ;
198
+ _layoutAlignment = LayoutAlignNormal ;
193
199
_justificationMode = JustificationMode . None ;
194
200
break ;
195
201
}
0 commit comments