private static void EndAnimation() { Animations animations = new Animations(); animations.animatorSet.AnimationEnd += (object sender, EventArgs e) => { RemoveTitle(mContainer); }; animations.AnimateObject(title, new string[] { "TranslationY", "Alpha" }, new float[] { 50, 0 }, 300, 1500); }
private static void StartAnimation() { Animations animations = new Animations(); animations.animatorSet.AnimationEnd += (object sender, EventArgs e) => { EndAnimation(); }; animations.AnimateObject(title, new string[] { "TranslationY", "Alpha" }, new float[] { 0, 1 }, 300); }
private void Initialize(Context ctx) { var inflatorService = (LayoutInflater)ctx.GetSystemService(Context.LayoutInflaterService); var MainView = inflatorService.Inflate(Resource.Layout.customview_inviteFriendBox, this, false); AddView(MainView); #region Animating view on load Alpha = 0; Animations animations = new Animations(); animations.AnimateObject(this, "Alpha", 1, 200, AnimationDelay); #endregion }
private void Initialize(Context ctx) { var inflatorService = (LayoutInflater)ctx.GetSystemService(Context.LayoutInflaterService); var MainView = inflatorService.Inflate(Resource.Layout.customview_startJourney, this, false); AddView(MainView); Button startJourney = FindViewById <Button>(Resource.Id.startJourneyBtn); startJourney.Click += StartJourney_Click; #region Animating view on load Alpha = 0; Animations animations = new Animations(); animations.AnimateObject(this, "Alpha", 1, 200, AnimationDelay); #endregion }