Hi
I need to show the user an long eula text.
I have an Label in a ScrollView i a Grid.
This code works on iOS and on Android in landscape mode?!?!?
but in Vertical mode on android it cut the text off about when there is about 20% left.
Does anybody have an idea what is going on?
(the "HeaderView" is just a gridview that i use to display a header)
`
public eulaAcceptPage(string eula)
{
this.eula = eula;
InitializeComponent();
setlayout();
}
private void InitializeComponent()
{
header = new HeaderView( text.consent(), text.back(), false);
buttomHeader = new HeaderView(text.no(), text.giveConsent(), text.yes());
consentText = new Label {
Text = eula,
LineBreakMode = LineBreakMode.WordWrap,
};
scrolltextView = new ScrollView {
Orientation = ScrollOrientation.Vertical,
Content = consentText,
};
}
private void setlayout()
{
Padding = new Thickness(1, Device.OnPlatform(20, 0, 0), 1, 5);
grid = new Grid
{
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
RowDefinitions =
{
new RowDefinition { Height = new GridLength(60, GridUnitType.Absolute) }, //0
new RowDefinition { Height = GridLength.Auto }, //1
new RowDefinition { Height = new GridLength(60, GridUnitType.Absolute) }, //2
},
ColumnDefinitions =
{
new ColumnDefinition { Width = GridLength.Star }, //0
new ColumnDefinition { Width = GridLength.Auto }, //1
new ColumnDefinition { Width = GridLength.Star }, //2
}
};
grid.Children.Add(scrolltextView, 0, 3, 1, 2);
grid.Children.Add(header, 0, 3, 0, 1);
grid.Children.Add(buttomHeader, 0, 3, 2, 3);
Content = grid;
}
protected override void OnDisappearing()
{
header.leftButton.Clicked -= backButton_Clicked;
buttomHeader.rightButton.Clicked -= ConsentGivenButton_Clicked;
base.OnDisappearing();
}
protected override void OnAppearing()
{
header.leftButton.Clicked += backButton_Clicked;
buttomHeader.rightButton.Clicked += ConsentGivenButton_Clicked;
base.OnAppearing();
}
`