Skip to content

Commit 3883d7c

Browse files
committed
Cleaned up code for an Android 4.2.2 issue
1 parent 5dd2f26 commit 3883d7c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/CustomLayouts/HomePage.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ View CreateTabs()
124124
{
125125
var pagerIndicator = new PagerIndicatorTabs() { HorizontalOptions = LayoutOptions.CenterAndExpand };
126126
pagerIndicator.RowDefinitions.Add(new RowDefinition() { Height = 50 });
127-
pagerIndicator.SetBinding(PagerIndicatorTabs.ColumnDefinitionsProperty, "Pages", BindingMode.Default, new SpacingConverter());
128127
pagerIndicator.SetBinding (PagerIndicatorTabs.ItemsSourceProperty, "Pages");
129128
pagerIndicator.SetBinding (PagerIndicatorTabs.SelectedItemProperty, "CurrentPage");
130129

src/CustomLayouts/PagerIndicatorTabs.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ void ItemsSourceChanged ()
112112
{
113113
if (ItemsSource == null) return;
114114

115+
this.ColumnDefinitions.Clear();
116+
foreach(var item in ItemsSource)
117+
{
118+
this.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) });
119+
}
120+
115121
CreateTabs();
116122
}
117123

0 commit comments

Comments
 (0)