summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-03-22 13:02:25 -0700
committerJason Smith <jason.smith@xamarin.com>2016-03-22 16:13:41 -0700
commit17fdde66d94155fc62a034fa6658995bef6fd6e5 (patch)
treeb5e5073a2a7b15cdbe826faa5c763e270a505729 /Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs
downloadxamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.gz
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.tar.bz2
xamarin-forms-17fdde66d94155fc62a034fa6658995bef6fd6e5.zip
Initial import
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs169
1 files changed, 169 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs
new file mode 100644
index 00000000..238ab936
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue1593.cs
@@ -0,0 +1,169 @@
+´╗┐using System;
+using System.Collections.Generic;
+using System.Text;
+using Xamarin.Forms;
+using Xamarin.Forms.CustomAttributes;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers=true)]
+ [Issue (IssueTracker.Github, 1593, "Android reports zero minimum size for almost all controls", PlatformAffected.Android)]
+ public class Issue1593 : ContentPage
+ {
+ public Issue1593 ()
+ {
+ var title = new Label {
+ Text = "Select League",
+ Font = Font.SystemFontOfSize (NamedSize.Large),
+ TextColor = Color.White
+ };
+
+ # region Season Filter
+
+ var seasonLabel = new Label {
+ Text = "Season",
+ Font = Font.SystemFontOfSize (NamedSize.Small),
+ TextColor = Color.White
+ };
+
+ var seasonPicker = new Picker {
+ WidthRequest = 140,
+ Title = "Season",
+ Items = { "Test 1", "Test 2"}
+ };
+
+ var seasonPanel = new StackLayout {
+ Children = {
+ seasonLabel,
+ seasonPicker
+ }
+ };
+
+ #endregion
+
+ # region Sport Filter
+
+ var sportLabel = new Label {
+ Text = "Sport",
+ Font = Font.SystemFontOfSize (NamedSize.Small),
+ TextColor = Color.White
+ };
+
+ var sportPicker = new Picker {
+ WidthRequest = 140,
+ Title = "Sport",
+ Items = { "Test 1", "Test 2"}
+ };
+
+ var sportPanel = new StackLayout {
+ Children = {
+ sportLabel,
+ sportPicker
+ }
+ };
+
+ #endregion
+
+ var filtersPanel = new StackLayout {
+ Padding = new Thickness (0, 10, 0, 0),
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.Fill,
+ Children = {
+ seasonPanel,
+ sportPanel
+ }
+ };
+
+ var leagues = new ListView {
+ MinimumHeightRequest = 100,
+ ItemsSource = new [] {
+ "Test 1",
+ "Test 2",
+ "Test 3",
+ "Test 4",
+ "Test 5",
+ "Test 6",
+ "Test 7",
+ "Test 8",
+ "Test 9",
+ "Test 10",
+ "Test 11",
+ "Test 12",
+ "Test 13",
+ "Test 14",
+ "Test 15",
+ },
+ BackgroundColor = Color.Gray,
+ ItemTemplate = new DataTemplate (() => {
+ var leagueName = new Label {
+ Font =
+ Font.SystemFontOfSize (NamedSize.Large),
+ BackgroundColor = Color.Transparent,
+ TextColor = Color.White,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ LineBreakMode = LineBreakMode.WordWrap
+ };
+ leagueName.SetBinding (Label.TextProperty, ".");
+
+ var row = new StackLayout {
+ Padding = new Thickness (5, 0, 5, 0),
+ BackgroundColor = Color.Transparent,
+ Orientation = StackOrientation.Horizontal,
+ VerticalOptions = LayoutOptions.CenterAndExpand,
+ Children = {
+ leagueName
+ }
+ };
+
+ return new ViewCell {
+ View = row
+ };
+ })
+ };
+
+ var activityIndicator = new ActivityIndicator {
+ VerticalOptions =
+ LayoutOptions.CenterAndExpand,
+ IsVisible = false
+ };
+
+ var titlePanel = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ Spacing = 50,
+ Children = {
+ title,
+ activityIndicator
+ }
+ };
+
+ var standingsButton = new Button {
+ Text = "Standings",
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ var scheduleButton = new Button {
+ Text = "Schedule",
+ HorizontalOptions = LayoutOptions.CenterAndExpand
+ };
+
+ var buttonPanel = new StackLayout {
+ Orientation = StackOrientation.Horizontal,
+ HorizontalOptions = LayoutOptions.CenterAndExpand,
+ Children = {
+ standingsButton,
+ scheduleButton
+ }
+ };
+
+ Content = new StackLayout {
+ Padding = 20,
+ Children = {
+ titlePanel,
+ filtersPanel,
+ leagues,
+ buttonPanel
+ }
+ };
+ }
+ }
+} \ No newline at end of file