コード例 #1
0
 private void AnimationSet_AnimationEnd(object sender, Animation.AnimationEndEventArgs e)
 {
     _parentActivity.Views.Remove(_lastView);
     //_parentActivity.RelativeLayout.RemoveView(_lastView);
     _lastView.Dispose();
     _parentActivity.SelectedViewIndex = -1;
 }
コード例 #2
0
 public void OnAnimationStart(Animation animation)
 {
     if (this.AnimationStart != null)
     {
         this.AnimationStart(this, new AnimationEventArgs(animation));
     }
 }
コード例 #3
0
 public void OnAnimationEnd(Animation animation)
 {
     animation.Reset ();
     if (AnimationEnded != null) {
         AnimationEnded ();
     }
 }
コード例 #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            RequestWindowFeature(WindowFeatures.NoTitle);
            SetContentView(Resource.Layout.passcode_main);

            _listener = new MessageListener(ACTION_SHAKE, ACTION_DISMISS);
            _listener.MessageReceived += HandleMessageReceived;
            _numbersEntered = 0;

            InitButtons();
            _selectedLayout = FindViewById<LinearLayout>(Resource.Id.passcode_toplayout);

            if(Intent != null)
            {
                bool showCancel = Intent.GetBooleanExtra(EXTRA_SHOW_CANCEL, false);
                _cancelButton.Visibility = showCancel ? ViewStates.Visible : ViewStates.Invisible;

                _passcodeLength = Intent.GetIntExtra(EXTRA_LENGTH, 4);
                _animationIn = Intent.GetIntExtra(EXTRA_IN_ANIMATION, 0);
                _animationOut = Intent.GetIntExtra(EXTRA_OUT_ANIMATION, 0);
            }

            HideUnusedCircles();

            _passcodeEntered = new int[_passcodeLength];
            _shakeAnimation = AnimationUtils.LoadAnimation(this, Resource.Animation.passcode_shake);
        }
コード例 #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.SplashScreenLayout);

            _splashLayout = FindViewById<RelativeLayout>(Resource.Id.SplashScreenLayout);
            _splashLayout.Visibility = ViewStates.Invisible;
            _fadeIn = AnimationUtils.LoadAnimation(this, Resource.Animation.splash_fade_in);
            _fadeOut = AnimationUtils.LoadAnimation(this, Resource.Animation.splash_fade_out);

            _fadeIn.AnimationEnd += (sender, e) =>
            {
                _splashLayout.StartAnimation(_fadeOut);
            };

            _fadeOut.AnimationEnd += (sender, e) =>
            {
                var intent = new Intent(this, typeof(MainActivity));
                StartActivity(intent);
                _splashLayout.Visibility = ViewStates.Gone;

                ThreadPool.QueueUserWorkItem(_ =>
                {
                    Finish();
                });
            };
        }
コード例 #6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.animation_demo);

            _shake = AnimationUtils.LoadAnimation(this, Resource.Animation.shake);
            _fadeOut = AnimationUtils.LoadAnimation(this, Resource.Animation.fade_out);
            _fadeIn = AnimationUtils.LoadAnimation(this, Resource.Animation.fade_in);
            _scale = AnimationUtils.LoadAnimation(this, Resource.Animation.scale);
            _text = FindViewById<TextView>(Resource.Id.text);

            FindViewById<Button>(Resource.Id.shake_button).Click += (e, args) =>
                _text.StartAnimation(_shake);

            FindViewById<Button>(Resource.Id.fadeout_button).Click += (e, args) =>
            {
                _text.StartAnimation(_fadeOut);
                _text.Visibility = Android.Views.ViewStates.Invisible;
            };

            FindViewById<Button>(Resource.Id.fadein_button).Click += (e, args) =>
            {
                _text.Visibility = Android.Views.ViewStates.Visible;
                _text.StartAnimation(_fadeIn);
            };

            FindViewById<Button>(Resource.Id.scale_button).Click += (e, args) =>
                _text.StartAnimation(_scale);
        }
コード例 #7
0
 public void OnAnimationEnd(Animation animation)
 {
     if (this.AnimationEnd != null)
     {
         this.AnimationEnd(this, new AnimationEventArgs(animation));
     }
 }
コード例 #8
0
 public Animation GetOutAnimation()
 {
     if ((null == _outAnimation) && (null != _activity))
     {
         _outAnimation = DefaultAnimationsBuilder.BuildDefaultSlideOutUpAnimation(GetView());
     }
     return _outAnimation;
 }
コード例 #9
0
 public Animation GetInAnimation()
 {
     if ((null == _inAnimation) && (null != _activity))
     {
         MeasureCroutonView();
         _inAnimation = DefaultAnimationsBuilder.BuildDefaultSlideInDownAnimation(GetView());
     }
     return _inAnimation;
 }
コード例 #10
0
 public void OnAnimationStart(Android.Views.Animations.Animation animation)
 {
     try
     {
     }
     catch (Exception ex)
     {
     }
 }
コード例 #11
0
ファイル: FadeImageView.cs プロジェクト: GSerjo/Seminars
		void Initialize ()
		{
			fadeInAnimation = new AlphaAnimation (0, 1) {
				Duration = 500
			};
			fadeOutAnimation = new AlphaAnimation (1, 0) {
				Duration = 100
			};
		}
コード例 #12
0
        public void ShowWithAnimation(Animation animation)
        {
            animation.AnimationEnd += (sender, e) => {
                Console.WriteLine("Set visibility!");
                Visibility = ViewStates.Visible;
            };

            Animation = animation;
        }
コード例 #13
0
ファイル: BadgeView.cs プロジェクト: SeanmanX/opandroid
			static BadgeView()
			{
				FadeIn = new AlphaAnimation (0.0f, 1.0f);
				FadeIn.Interpolator = new DecelerateInterpolator ();
				FadeIn.Duration = 200;

				FadeOut = new AlphaAnimation (1.0f, 0.0f);
				FadeOut.Interpolator = new AccelerateDecelerateInterpolator ();
				FadeOut.Duration = 200;
			}
コード例 #14
0
		public override void OnCreate(Bundle savedInstanceState)
		{
			pageIndex = 0;
			animOut = AnimationUtils.LoadAnimation(Activity, Resource.Animation.Overlay_animOut);
			animBack = AnimationUtils.LoadAnimation(Activity, Resource.Animation.selectRank_Previous_Out);
			animReadMore = AnimationUtils.LoadAnimation(Activity, Resource.Animation.selectRank_Next_Out);
			animReadMoreIn = AnimationUtils.LoadAnimation(Activity, Resource.Animation.selectRank_Next_In);
			animBackIn = AnimationUtils.LoadAnimation(Activity, Resource.Animation.selectRank_Previous_In);
			base.OnCreate(savedInstanceState);
		}
コード例 #15
0
 public static Animation BuildDefaultSlideInDownAnimation(View croutonView)
 {
     if (_lastInAnimationHeight != croutonView.MeasuredHeight || (null == _slideInDownAnimation))
     {
         _slideInDownAnimation = new TranslateAnimation(0, 0, -croutonView.MeasuredHeight, 0);
         _slideInDownAnimation.Duration = Duration;
         _lastInAnimationHeight = croutonView.MeasuredHeight;
     }
     return _slideInDownAnimation;
 }
コード例 #16
0
 public void ShowKeyboardWithAnimation()
 {
     if (mKeyboardView.Visibility == ViewStates.Gone)
     {
         mKeyboardView.Visibility = ViewStates.Visible;
         Android.Views.Animations.Animation animation = AnimationUtils.LoadAnimation(
             Context,
             Resource.Animation.slide_in_bottom
             );
         mKeyboardView.ShowWithAnimation(animation);
     }
 }
コード例 #17
0
ファイル: ImageFader.cs プロジェクト: stecenko/MyCompany
		void Initialize()
		{
			this.SetScaleType (ImageView.ScaleType.FitCenter);
			fadeInAnimation = new AlphaAnimation(0, 1)
			{
				Duration = 500
			};
			fadeOutAnimation = new AlphaAnimation(1, 0)
			{
				Duration = 100
			};
		}
コード例 #18
0
ファイル: MainActivity.cs プロジェクト: eardic/ScreenWaker
        private void AnimOnAnimationEnd(object sender, Animation.AnimationEndEventArgs animationEndEventArgs)
        {
            // Main Layout
            var view = LayoutInflater.Inflate(Resource.Layout.Main, null, false);
            var anim = AnimationUtils.LoadAnimation(this, Android.Resource.Animation.FadeIn);
            
            anim.Duration = 1000;
            view.StartAnimation(anim);
            SetContentView(view);

            var start = FindViewById<Button>(Resource.Id.BtnStartService);
            var status = FindViewById<TextView>(Resource.Id.statusText);
            var openClose = FindViewById<TextView>(Resource.Id.openCloseText);

            if (IsServiceRunning())
            {
                start.SetBackgroundResource(Resource.Drawable.PowerOff);
                status.SetText(Resource.String.Active);
                status.SetTextColor(Resources.GetColor(Android.Resource.Color.HoloGreenLight));
                openClose.SetText(Resource.String.ClickToClose);
            }
            else
            {
                start.SetBackgroundResource(Resource.Drawable.PowerOn);
                status.SetText(Resource.String.Passive);
                status.SetTextColor(Resources.GetColor(Android.Resource.Color.HoloRedLight));
                openClose.SetText(Resource.String.ClickToOpen);
            }

            //var layout = FindViewById<RelativeLayout>(Resource.Id.MainLayout);

            start.Click += delegate
            {
                if (IsServiceRunning())
                {
                    this.StopService(new Intent(this, typeof (WakeUpService)));
                    start.SetBackgroundResource(Resource.Drawable.PowerOn);
                    status.SetText(Resource.String.Passive);
                    status.SetTextColor(Resources.GetColor(Android.Resource.Color.HoloRedLight));
                    openClose.SetText(Resource.String.ClickToOpen);
                    //Toast.MakeText(this, Resource.String.StopService, ToastLength.Long).Show();
                }
                else
                {
                    this.StartService(new Intent(this, typeof (WakeUpService)));
                    start.SetBackgroundResource(Resource.Drawable.PowerOff);
                    status.SetText(Resource.String.Active);
                    status.SetTextColor(Resources.GetColor(Android.Resource.Color.HoloGreenLight));
                    openClose.SetText(Resource.String.ClickToClose);
                    //Toast.MakeText(this, Resource.String.StartService, ToastLength.Long).Show();
                }
            };
        }
コード例 #19
0
ファイル: KBActivity.cs プロジェクト: dlhoff/DraftSurvey
 public void ShowKeyboardWithAnimation()
 {
     System.Diagnostics.Debug.WriteLine("keyboardState: " + mKeyboardView.Visibility.ToString());
     if (mKeyboardView.Visibility == ViewStates.Gone)
     {
         // System.Diagnostics.Debug.WriteLine("keyboardState: Gone is true");
         Android.Views.Animations.Animation animation = AnimationUtils.LoadAnimation(
             MainActivity.mainActivity, Resource.Animation.slide_in_bottom);
         // System.Diagnostics.Debug.WriteLine("keyboardState, animation/code is: " + animation.ToString() + " " +
         //     Resource.Animation.slide_in_bottom);
         mKeyboardView.Visibility = ViewStates.Visible;
     }
 }
コード例 #20
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            _flurryClient = new FlurryClient();
            AppInfo._display = WindowManager.DefaultDisplay;

            AppInfo.IsLocaleRu = false;
            var locale =  Java.Util.Locale.Default.DisplayLanguage;
            if (locale == "русский")
            {
                AppInfo.IsLocaleRu = true;
            }

            AppInfo._badgesCount = 0;
            AppInfo._subcategCount = 0;
            AppInfo._bonusesCount = 0;

            Vibrator vibe = (Vibrator)this.GetSystemService(Context.VibratorService);

            SetContentView(Resource.Layout.loginactivitylayout);
            buttonClickAnimation = AnimationUtils.LoadAnimation(this, Android.Resource.Animation.FadeIn);

            ImageButton loginButton = FindViewById<ImageButton>(Resource.Id.login);
            TextView signUpTextView = FindViewById<TextView>(Resource.Id.signUpTextView);
            TextView signInTextView = FindViewById<TextView>(Resource.Id.login_signinTextView);
            TextView centerTextView = FindViewById<TextView>(Resource.Id.login_centerTextView);

            if (!AppInfo.IsLocaleRu)
            {
                signUpTextView.Text = "About project";
                signInTextView.Text = "               Sign in with";
                centerTextView.Text = "Collect all your achievements";
            }

            //login_centerTextView
            signUpTextView.Click += delegate
            {
                Intent browserIntent = new Intent(Intent.ActionView, Android.Net.Uri.Parse("http://itsbeta.com/"));
                StartActivity(browserIntent);
            };

            loginButton.Click += delegate
            {
                loginButton.StartAnimation(buttonClickAnimation);
                vibe.Vibrate(50);
                Finish();
                StartActivity(typeof(LoginWebActivity));
            };
        }
コード例 #21
0
ファイル: MsgManager.cs プロジェクト: wnf0000/AppMsg
 public void Add(AppMsg appMsg)
 {
     msgQueue.Enqueue(appMsg);
     if (inAnimation == null)
     {
         inAnimation = AnimationUtils.LoadAnimation(appMsg.Activity,
             Android.Resource.Animation.FadeIn);
     }
     if (outAnimation == null)
     {
         outAnimation = AnimationUtils.LoadAnimation(appMsg.Activity,
             Android.Resource.Animation.FadeOut);
     }
     DisplayMsg();
 }
コード例 #22
0
ファイル: Activity1.cs プロジェクト: adbk/spikes
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.Main);
            _slider = FindViewById<View>(Resource.Id.slider_view);
            var showButton = FindViewById<Button>(Resource.Id.selectPhotosButton);
            var cancelButton = FindViewById<Button>(Resource.Id.cancelButton);

            showButton.Click += showButton_Click;
            cancelButton.Click += cancelButton_Click;


            inAnim = AnimationUtils.LoadAnimation(this, Resource.Animation.SlideInUp);
            outAnim = AnimationUtils.LoadAnimation(this, Resource.Animation.SlideOutDown);
        }
コード例 #23
0
 public void OnAnimationEnd(Animation animation)
 {
     View view = appMsg.View;
     if (appMsg.Floating)
     {
         ViewGroup parent = view.Parent as ViewGroup;
         if (parent != null)
         {
             parent.Post(() =>
             {
                 parent.RemoveView(view);
             });
         }
     }
     else
     {
         view.Visibility = ViewStates.Gone;
     }
 }
コード例 #24
0
        public FlipLoadingLayout(Context context, Mode mode, PTROrientation scrollDirection, TypedArray attrs)
            : base(context, mode, scrollDirection, attrs)
        {
            //super(context, mode, scrollDirection, attrs);

            int rotateAngle = mode == Mode.PULL_FROM_START ? -180 : 180;

            mRotateAnimation = new RotateAnimation(0, rotateAngle, Dimension.RelativeToSelf, 0.5f,
                    Dimension.RelativeToSelf, 0.5f);
            mRotateAnimation.Interpolator = ANIMATION_INTERPOLATOR;
            mRotateAnimation.Duration = FLIP_ANIMATION_DURATION;
            mRotateAnimation.FillAfter = true;

            mResetRotateAnimation = new RotateAnimation(rotateAngle, 0, Dimension.RelativeToSelf, 0.5f,
                    Dimension.RelativeToSelf, 0.5f);
            mResetRotateAnimation.Interpolator = ANIMATION_INTERPOLATOR;
            mResetRotateAnimation.Duration = FLIP_ANIMATION_DURATION;
            mResetRotateAnimation.FillAfter = true;
        }
コード例 #25
0
        protected async override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Favorites);

            // toolbar setup
            var toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);

            favoritesListView = FindViewById<RecyclerView>(Resource.Id.FavoritesList);

            // use this setting to improve performance if you know that changes
            // in content do not change the layout size of the RecyclerView
            favoritesListView.HasFixedSize = true;
            // use a linear layout manager
            var layoutManager = new LinearLayoutManager(this);
            layoutManager.Orientation = (int)Orientation.Vertical;
            favoritesListView.SetLayoutManager(layoutManager);



            _favoritesService = SimpleIoc.Default.GetInstance<IFavoritesService>();
            _favorites = await _favoritesService.GetFavoritesAsync();

       
            // specify an adapter (see also next example)
            mAdapter = new FavoriteListAdapter(this, _favorites, this);
            favoritesListView.SetAdapter(mAdapter);
            favoritesListView.ChildViewRemoved += FavoritesListView_ChildViewRemoved;
            var callback = new SimpleItemTouchHelperCallback((IItemTouchHelperAdapter)mAdapter);
            _itemTouchHelper = new ItemTouchHelper(callback);
            _itemTouchHelper.AttachToRecyclerView(favoritesListView);

            _placeHolder = FindViewById<TextView>(Resource.Id.placeHolder);
            _placeHolderAnimation = AnimationUtils.LoadAnimation(this, Resource.Animation.placeholder);
            if (_favorites.Count == 0)
            {
                await Task.Delay(200);
                _placeHolder.StartAnimation(_placeHolderAnimation);
                _placeHolder.Visibility = ViewStates.Visible;
            }
        }
コード例 #26
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            if (holder is RecyclerViewHolder)
            {
                RecyclerViewHolder recyclerViewHolder        = (RecyclerViewHolder)holder;
                Android.Views.Animations.Animation animation = AnimationUtils.LoadAnimation(context, Resource.Animation.anim_recycler_item_show);
                recyclerViewHolder.mView.StartAnimation(animation);
                recyclerViewHolder.Msg.Text = $"{position}";

                AlphaAnimation aa1 = new AlphaAnimation(1.0f, 0.1f);
                aa1.Duration = 400;
                recyclerViewHolder.rela_round.StartAnimation(aa1);

                AlphaAnimation aa = new AlphaAnimation(0.1f, 1.0f);
                aa.Duration = 400;

                if (color == 1)
                {
                    recyclerViewHolder.rela_round.BackgroundTintList = ColorStateList.ValueOf(new Android.Graphics.Color(Utils.AppUtils.GetColor(context, Resource.Color.google_blue)));
                }
                else if (color == 2)
                {
                    recyclerViewHolder.rela_round.BackgroundTintList = ColorStateList.ValueOf(new Android.Graphics.Color(Utils.AppUtils.GetColor(context, Resource.Color.google_green)));
                }
                else if (color == 3)
                {
                    recyclerViewHolder.rela_round.BackgroundTintList = ColorStateList.ValueOf(new Android.Graphics.Color(Utils.AppUtils.GetColor(context, Resource.Color.google_yellow)));
                }
                else if (color == 4)
                {
                    recyclerViewHolder.rela_round.BackgroundTintList = ColorStateList.ValueOf(new Android.Graphics.Color(Utils.AppUtils.GetColor(context, Resource.Color.google_red)));
                }
                else
                {
                    recyclerViewHolder.rela_round.BackgroundTintList = ColorStateList.ValueOf(new Android.Graphics.Color(Utils.AppUtils.GetColor(context, Resource.Color.gray)));
                }

                recyclerViewHolder.rela_round.StartAnimation(aa);

                recyclerViewHolder.mView.SetOnClickListener(new RecycleViewHolderClick(context, recyclerViewHolder, color));
            }
        }
コード例 #27
0
        public RotateLoadingLayout(Context context, Mode mode, PtrOrientation scrollDirection, TypedArray attrs)
            : base(context, mode, scrollDirection, attrs)
        {
            //super(context, mode, scrollDirection, attrs);

            mRotateDrawableWhilePulling = attrs.GetBoolean(Resource.Styleable.PullToRefresh_ptrRotateDrawableWhilePulling, true);

            mHeaderImage.SetScaleType(ImageView.ScaleType.Matrix);
            mHeaderImageMatrix = new Matrix();
            mHeaderImage.ImageMatrix = mHeaderImageMatrix;

            mRotateAnimation = new RotateAnimation(0, 720, Dimension.RelativeToSelf, 0.5f, Dimension.RelativeToSelf,
                    0.5f);

            mRotateAnimation.Interpolator = ANIMATION_INTERPOLATOR;
            mRotateAnimation.Duration = ROTATION_ANIMATION_DURATION;
            mRotateAnimation.RepeatCount = Animation.Infinite;
            mRotateAnimation.RepeatMode = RepeatMode.Restart;

        }
コード例 #28
0
        private void RotateLayerInfinite()
        {
            if (_rotation == null)
            {
                PhantomLib.Effects.Spinner effect = (PhantomLib.Effects.Spinner)Element.Effects.FirstOrDefault(x => x is PhantomLib.Effects.Spinner);
                if (effect == null)
                {
                    return;
                }

                _rotation = new RotateAnimation(0, 360, Dimension.RelativeToSelf, 0.5f, Dimension.RelativeToSelf, 0.5f)
                {
                    Interpolator = new LinearInterpolator(),
                    Duration     = effect.Duration,
                    RepeatCount  = effect.RepeatCount <= 0 ? -1 : effect.RepeatCount
                };

                Control.StartAnimation(_rotation);
            }
        }
コード例 #29
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			Log.Debug ("PantallaCompleta","Inicia PantallaCompleta");
			Log.Debug ("PantallaCompleta","SetContentView");
			floatbounce = AnimationUtils.LoadAnimation (Application.Context, Resource.Animation.floatbounce);
			bounce = AnimationUtils.LoadAnimation (Application.Context, Resource.Animation.floatbounce);

			this.Window.AddFlags(WindowManagerFlags.Fullscreen);

			SetContentView (Resource.Layout.pantalla_completa);

			Log.Debug ("PantallaCompleta","Se recupera la ruta");
			string ruta = Intent.GetStringExtra ("ruta");



			ImageView imagen = FindViewById<ImageView> (Resource.Id.imageView1);
			//imagen.StartAnimation (bounce);
			Koush.UrlImageViewHelper.SetUrlDrawable (imagen, ParseRuta(ruta), Resource.Drawable.bolaplace);

			// Create your application here
		}
コード例 #30
0
 public AppMsg SetAnimation(Animation inAnimation, Animation outAnimation)
 {
     mInAnimation = inAnimation;
     mOutAnimation = outAnimation;
     return this;
 }
コード例 #31
0
ファイル: LoginView.cs プロジェクト: aocsa/CInca
		void Animation_AnimationEnd (object sender, Animation.AnimationEndEventArgs e)
		{
			relSingup.Alpha = 0.0f;
			setItemLogin ();
			//setItemsContentRegister();

		}
コード例 #32
0
 void AndroidAnimation.IAnimationListener.OnAnimationStart(AndroidAnimation animation)
 {
 }
コード例 #33
0
 void AndroidAnimation.IAnimationListener.OnAnimationRepeat(AndroidAnimation animation)
 {
 }
コード例 #34
0
 void AndroidAnimation.IAnimationListener.OnAnimationEnd(AndroidAnimation animation)
 {
     View?.SetLayerType(LayerType.None, null);
     AnimationFinished?.Invoke(this, EventArgs.Empty);
 }
コード例 #35
0
ファイル: mFragment.cs プロジェクト: YoDevil/SmartReport
 public void OnAnimationStart(Animation animation) { }
コード例 #36
0
ファイル: mFragment.cs プロジェクト: YoDevil/SmartReport
 public void OnAnimationRepeat(Animation animation) { }
コード例 #37
0
ファイル: mFragment.cs プロジェクト: YoDevil/SmartReport
 public void OnAnimationEnd(Animation animation)
 {
     view.SetLayerType(LayerType.None, null);
 }
コード例 #38
0
ファイル: SignInDialog.cs プロジェクト: pafik13/SBL-CRM
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            // return inflater.Inflate(Resource.Layout.YourFragment, container, false);

            base.OnCreateView (inflater, container, savedInstanceState);

            Dialog.SetCanceledOnTouchOutside (true);

            var view = inflater.Inflate (Resource.Layout.SignInDialog, container, false);

            bSignUp = view.FindViewById<Button> (Resource.Id.btnDialogEmail);

            llInfo = view.FindViewById<LinearLayout> (Resource.Id.llInfo);
            llSuccess = view.FindViewById<LinearLayout> (Resource.Id.llSuccess);
            llWarning = view.FindViewById<LinearLayout> (Resource.Id.llWarning);
            llDanger = view.FindViewById<LinearLayout> (Resource.Id.llDanger);
            tvProgressInfo = view.FindViewById<TextView> (Resource.Id.sidProgressInfo);
            tvProgressSuccess = view.FindViewById<TextView> (Resource.Id.sidProgressSuccess);
            tvProgressWarning = view.FindViewById<TextView> (Resource.Id.sidProgressWarning);
            tvProgressDanger = view.FindViewById<TextView> (Resource.Id.sidProgressDanger);

            tvUsername = view.FindViewById<TextView> (Resource.Id.txtUsername);
            tvPassword = view.FindViewById<TextView> (Resource.Id.txtPassword);

            context = inflater.Context;

            bSignUp.Click += (object sender, EventArgs e) => {
                Toast.MakeText(inflater.Context, @"Click", ToastLength.Short).Show();
                mAnimation = AnimationUtils.LoadAnimation(inflater.Context,Resource.Animation.slide_right);
            //				anim.FillAfter = true;
            //				anim.AnimationEnd += Anim_AnimationEnd;
            //				mAnimation = new TranslateAnimation(
            //					Dimension.RelativeToSelf, 0f,
            //					Dimension.RelativeToParent, 1.0f,
            //					Dimension.Absolute, 0f,
            //					Dimension.Absolute, 0f);
            //				//mAnimation.FillAfter = true;
            //				mAnimation.Duration = 500;
                //mAnimation.RepeatCount = -1;
                //mAnimation.RepeatMode = RepeatMode.Reverse;
                //mAnimation.Interpolator = new LinearInterpolator();
                mAnimation.AnimationEnd += Anim_AnimationEnd;
                bSignUp.StartAnimation(mAnimation);

            //				ThreadPool.QueueUserWorkItem (o => SlowMethod ());

                //bSignUp.Animate().TranslationY(bSignUp.Height).SetListener(new ;
            //				if (mAnimation.HasEnded) {
            //					Toast.MakeText(inflater.Context, @"Animation End", ToastLength.Short).Show();
            //				} else {
            //					Toast.MakeText(inflater.Context, @"Animation NOT End", ToastLength.Short).Show();
            //				}
            };

            return view;
        }
コード例 #39
0
        private void SetAnimToTellmeView()
        {
            Animation myAnim = AnimationUtils.LoadAnimation(this, Resource.Animation.bounce);

            tellmeLayout.StartAnimation(myAnim);
        }
コード例 #40
0
 protected void Shake(EditText view)
 {
     Android.Views.Animations.Animation shake = AnimationUtils.LoadAnimation(CrossCurrentActivity.Current.Activity, Resource.Animation.anim_shake);
     view?.StartAnimation(shake);
 }