protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.AnimationReversing);

            var container = FindViewById <LinearLayout>(Resource.Id.container);

            var animView = new MyAnimationView(this);

            container.AddView(animView);

            var starter = FindViewById <Button>(Resource.Id.startButton);

            starter.Click += delegate
            {
                animView.StartAnimation();
            };

            var reverse = FindViewById <Button>(Resource.Id.reverseButton);

            reverse.Click += delegate
            {
                animView.ReverseAnimation();
            };
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.AnimationSeeking);

            var container = FindViewById <LinearLayout>(Resource.Id.container);

            seekBar = FindViewById <SeekBar>(Resource.Id.seekBar);

            var animView = new MyAnimationView(this, seekBar);

            container.AddView(animView);

            seekBar.Max              = Duration;
            seekBar.ProgressChanged += (sender, e) =>
            {
                // prevent seeking on app creation
                if (animView.Height != 0)
                {
                    animView.Seek(e.Progress);
                }
            };

            var starter = FindViewById <Button>(Resource.Id.startButton);

            starter.Click += delegate
            {
                animView.StartAnimation();
            };
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.AnimatorEvents);

            var container = FindViewById <LinearLayout>(Resource.Id.container);

            var animView = new MyAnimationView(this);

            container.AddView(animView);

            startText = FindViewById <TextView>(Resource.Id.startText);
            startText.SetTextColor(Off);
            repeatText = FindViewById <TextView>(Resource.Id.repeatText);
            repeatText.SetTextColor(Off);
            cancelText = FindViewById <TextView>(Resource.Id.cancelText);
            cancelText.SetTextColor(Off);
            endText = FindViewById <TextView>(Resource.Id.endText);
            endText.SetTextColor(Off);
            startTextAnimator = FindViewById <TextView>(Resource.Id.startTextAnimator);
            startTextAnimator.SetTextColor(Off);
            repeatTextAnimator = FindViewById <TextView>(Resource.Id.repeatTextAnimator);
            repeatTextAnimator.SetTextColor(Off);
            cancelTextAnimator = FindViewById <TextView>(Resource.Id.cancelTextAnimator);
            cancelTextAnimator.SetTextColor(Off);
            endTextAnimator = FindViewById <TextView>(Resource.Id.endTextAnimator);
            endTextAnimator.SetTextColor(Off);
            var endCB = FindViewById <CheckBox>(Resource.Id.endCB);

            var starter = FindViewById <Button>(Resource.Id.startButton);

            starter.Click += delegate
            {
                animView.StartAnimation(endCB.Checked);
            };

            var canceler = FindViewById <Button>(Resource.Id.cancelButton);

            canceler.Click += delegate
            {
                animView.CancelAnimation();
            };

            var ender = FindViewById <Button>(Resource.Id.endButton);

            ender.Click += delegate
            {
                animView.EndAnimation();
            };
        }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.AnimationCloning);

            var container = FindViewById<LinearLayout>(Resource.Id.container);

            var animView = new MyAnimationView(this);
            container.AddView(animView);

            var starter = FindViewById<Button>(Resource.Id.startButton);
            starter.Click += delegate
            {
                animView.StartAnimation();
            };
        }
Exemplo n.º 5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.AnimationCloning);

            var container = FindViewById <LinearLayout>(Resource.Id.container);

            var animView = new MyAnimationView(this);

            container.AddView(animView);

            var starter = FindViewById <Button>(Resource.Id.startButton);

            starter.Click += delegate
            {
                animView.StartAnimation();
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.AnimationReversing);

            var container = FindViewById<LinearLayout>(Resource.Id.container);

            var animView = new MyAnimationView(this);
            container.AddView(animView);

            var starter = FindViewById<Button>(Resource.Id.startButton);
            starter.Click += delegate
            {
                animView.StartAnimation();
            };

            var reverse = FindViewById<Button>(Resource.Id.reverseButton);
            reverse.Click += delegate
            {
                animView.ReverseAnimation();
            };
        }