private void ShowSuggestionsContainerWithAnimation() { if (Device.RuntimePlatform.Equals(Device.Android)) { SuggestionsTitlesStack.IsVisible = true; } SuggestionsContainerStack.Animate("ShowContainer", x => { double tempHeight = GetPossibleMaxHeightForSuggestionContainer(); SuggestionsContainerStack.HeightRequest = tempHeight * x; }); }
private async Task HideSuggestionsContainerWithAnimation() { SuggestionsContainerStack.Animate("HideContainer", x => { double tempHeight = GetPossibleMinHeightForSuggestionContainer(); SuggestionsContainerStack.HeightRequest = tempHeight * (1 - x); }); if (Device.RuntimePlatform.Equals(Device.Android)) { SuggestionsTitlesStack.IsVisible = false; await Task.Delay((int)AppThemeConstants.AnimationSpeed); SuggestionsContainerStack.IsVisible = false; } }