private void ShowPricing() { if (!IsShowingAffirmation) { return; } NotionalTextBox.ClearFocus(); AnimationFactory.FlipTransition(ViewAnimator, FlipDirection.LeftRight, 200); }
/** * Flip to the next view of the {@code ViewAnimator}'s subviews. A call to this method will initiate a {@link FlipAnimation} to show the next View. * If the currently visible view is the last view, flip direction will be reversed for this transition. * * @param viewAnimator the {@code ViewAnimator} * @param dir the direction of flip * @param duration the transition duration in milliseconds */ public static void FlipTransition(ViewAnimator viewAnimator, FlipDirection dir, long duration) { View fromView = viewAnimator.CurrentView; int currentIndex = viewAnimator.DisplayedChild; int nextIndex = (currentIndex + 1) % viewAnimator.ChildCount; View toView = viewAnimator.GetChildAt(nextIndex); Animation[] animc = AnimationFactory.FlipAnimation(fromView, toView, (nextIndex < currentIndex ? dir.OtherDirection() : dir), duration, new AnticipateOvershootInterpolator()); viewAnimator.OutAnimation = animc[0]; viewAnimator.InAnimation = animc[1]; viewAnimator.ShowNext(); }
private void ShowAffirmation(ISpotTileAffirmationViewModel vm) { if (IsShowingAffirmation) { return; } HideKeyboard(NotionalTextBox); AnimationFactory.FlipTransition(ViewAnimator, FlipDirection.LeftRight, 200); ItemView.FindViewById <TextView>(Resource.Id.ConfirmDirectionTextView).Text = vm.Direction == Domain.Models.Direction.BUY ? "Bought" : "Sold"; ItemView.FindViewById <TextView>(Resource.Id.ConfirmCurrencyPairTextView).Text = vm.CurrencyPair; ItemView.FindViewById <TextView>(Resource.Id.ConfirmNotionalTextView).Text = $"{vm.Notional:N0} {vm.DealtCurrency}"; ItemView.FindViewById <TextView>(Resource.Id.ConfirmSpotRateTextView).Text = vm.SpotRate.ToString(CultureInfo.InvariantCulture); ItemView.FindViewById <TextView>(Resource.Id.ConfirmStatusTextView).Text = vm.Rejected; ItemView.FindViewById <TextView>(Resource.Id.ConfirmTradeIdTextView).Text = vm.TradeId.ToString(); }