summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2017-05-26 12:30:01 +0100
committerGitHub <noreply@github.com>2017-05-26 12:30:01 +0100
commit657c3e39f8ea62b61c5368f3b7c14572fef0f402 (patch)
tree0a782cb85d7f227a2c245d8e3b739ebf83044ac0 /Xamarin.Forms.Controls.Issues
parenta9a6a40c67bf52012f46a2809dd98ad0571b48b9 (diff)
downloadxamarin-forms-657c3e39f8ea62b61c5368f3b7c14572fef0f402.tar.gz
xamarin-forms-657c3e39f8ea62b61c5368f3b7c14572fef0f402.tar.bz2
xamarin-forms-657c3e39f8ea62b61c5368f3b7c14572fef0f402.zip
[Android] Set SingleLine to true when we only have 1 line on a TextView (#932)
* [Android] Set SingleLine to true when we only have 1 line on a TextView * Fix stray \ char
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla49069.cs66
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems3
2 files changed, 68 insertions, 1 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla49069.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla49069.cs
new file mode 100644
index 00000000..5280c5a4
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla49069.cs
@@ -0,0 +1,66 @@
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+// Apply the default category of "Issues" to all of the tests in this assembly
+// We use this as a catch-all for tests which haven't been individually categorized
+#if UITEST
+[assembly: NUnit.Framework.Category("Issues")]
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 49069, "Java.Lang.ArrayIndexOutOfBoundsException when rendering long Label on Android", PlatformAffected.Default)]
+ public class Bugzilla49069 : TestContentPage // or TestMasterDetailPage, etc ...
+ {
+ protected override void Init()
+ {
+ Label longLabelWithHorizontalTextAlignmentOfEndAndHeadTruncation = new Label
+ {
+ AutomationId = "lblLong",
+ TextColor = Color.Black,
+ BackgroundColor = Color.Pink,
+ Text = "This is a long string that should hopefully truncate. It has HeadTruncation enabled and HorizontalTextAlignment = End",
+ LineBreakMode = LineBreakMode.HeadTruncation,
+ HorizontalTextAlignment = TextAlignment.End
+ };
+
+ StackLayout vslOuterPage = new StackLayout
+ {
+ BackgroundColor = Color.White, // viewModel.PageBackgroundColor,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ Margin = new Thickness(0, 0, 0, 0), // gets rid of the white
+ Padding = new Thickness(0, 10, 0, 10),
+ Spacing = 0,
+ Children =
+ {
+ longLabelWithHorizontalTextAlignmentOfEndAndHeadTruncation,
+ }
+ };
+
+ ScrollView sv = new ScrollView
+ {
+ Content = vslOuterPage,
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.Fill,
+ Orientation = ScrollOrientation.Vertical
+ };
+
+ Content = sv;
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla49069Test ()
+ {
+ RunningApp.WaitForElement (q => q.Marked ("lblLong"));
+ }
+#endif
+ }
+} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 66180f21..e9e9ff0b 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -550,6 +550,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla54977.xaml.cs">
<DependentUpon>Bugzilla54977.xaml</DependentUpon>
</Compile>
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla49069.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla42956.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla38731.cs" />
</ItemGroup>
@@ -704,4 +705,4 @@
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>