mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-21 06:59:17 +00:00
Android requires hiding rows with height = 0
This commit is contained in:
@@ -37,6 +37,7 @@ namespace qController.UI
|
|||||||
BindingContext = qCueViewModel,
|
BindingContext = qCueViewModel,
|
||||||
HorizontalOptions = LayoutOptions.FillAndExpand,
|
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||||
VerticalTextAlignment = TextAlignment.Center,
|
VerticalTextAlignment = TextAlignment.Center,
|
||||||
|
Margin = new Thickness(10, 0, 0, 0),
|
||||||
//BackgroundColor = Color.Blue,
|
//BackgroundColor = Color.Blue,
|
||||||
};
|
};
|
||||||
cueLabel.SetBinding(Label.TextProperty, "name", BindingMode.OneWay);
|
cueLabel.SetBinding(Label.TextProperty, "name", BindingMode.OneWay);
|
||||||
@@ -47,14 +48,25 @@ namespace qController.UI
|
|||||||
{
|
{
|
||||||
FontFamily = App.QFont,
|
FontFamily = App.QFont,
|
||||||
BindingContext = qCueViewModel,
|
BindingContext = qCueViewModel,
|
||||||
HorizontalOptions = LayoutOptions.StartAndExpand,
|
HorizontalOptions = LayoutOptions.FillAndExpand,
|
||||||
HorizontalTextAlignment = TextAlignment.Start,
|
HorizontalTextAlignment = TextAlignment.Start,
|
||||||
|
VerticalOptions = LayoutOptions.FillAndExpand,
|
||||||
VerticalTextAlignment = TextAlignment.Center,
|
VerticalTextAlignment = TextAlignment.Center,
|
||||||
Padding = 0,
|
Padding = 0,
|
||||||
Margin = new Thickness(10,0,0,0),
|
Margin = new Thickness(10,0,0,0),
|
||||||
FontSize = App.HeightUnit * 3,
|
|
||||||
//BackgroundColor = Color.Red
|
//BackgroundColor = Color.Red
|
||||||
};
|
};
|
||||||
|
|
||||||
|
switch (Device.RuntimePlatform)
|
||||||
|
{
|
||||||
|
case Device.Android:
|
||||||
|
cueTypeLabel.FontSize = App.HeightUnit * 4;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
cueTypeLabel.FontSize = App.HeightUnit * 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
cueTypeLabel.SetBinding(Label.TextProperty, "type", BindingMode.OneWay);
|
cueTypeLabel.SetBinding(Label.TextProperty, "type", BindingMode.OneWay);
|
||||||
cueTypeLabel.SetDynamicResource(Label.TextColorProperty, "IconTextColor");
|
cueTypeLabel.SetDynamicResource(Label.TextColorProperty, "IconTextColor");
|
||||||
|
|
||||||
@@ -78,6 +90,18 @@ namespace qController.UI
|
|||||||
for (var i = 1; i < RowDefinitions.Count; i++)
|
for (var i = 1; i < RowDefinitions.Count; i++)
|
||||||
{
|
{
|
||||||
RowDefinitions[i].Height = qCueViewModel.IsCollapsed ? 0 : GridLength.Auto;
|
RowDefinitions[i].Height = qCueViewModel.IsCollapsed ? 0 : GridLength.Auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Device.RuntimePlatform.Equals(Device.Android))
|
||||||
|
{
|
||||||
|
foreach (var child in Children)
|
||||||
|
{
|
||||||
|
if (Grid.GetRow(child) > 0)
|
||||||
|
{
|
||||||
|
child.IsVisible = !qCueViewModel.IsCollapsed;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user