Ejemplo n.º 1
0
 public void OnAnimationEnd(Android.Views.Animations.Animation animation)
 {
     if (m_isLast && OnAnimationEndEvent != null)
     {
         OnAnimationEndEvent();
     }
 }
Ejemplo n.º 2
0
 public void OnAnimationStart(Android.Views.Animations.Animation animation)
 {
     if (_menu == null || !_menu.CloseItemsOnClick)
     {
         return;
     }
     _menu.Close();
 }
Ejemplo n.º 3
0
        private void SetupBottomBar()
        {
            var dialogueBtn    = FindViewById <Button>(Resource.Id.ma_bottomBtn1);
            var contactBtn     = FindViewById <Button>(Resource.Id.ma_bottomBtn2);
            var dialogueLayout = FindViewById <RelativeLayout>(Resource.Id.ma_dialogueLayout);
            var contactLayout  = FindViewById <RelativeLayout>(Resource.Id.ma_contactLayout);

            //연락처 버튼 클릭 시
            contactBtn.Click += (sender, o) =>
            {
                if (_CurrentPage == (int)MAINPAGETYPE.CONTACT)
                {
                    return;
                }
                _CurrentPage = (int)MAINPAGETYPE.CONTACT;

                ContactDBManager.Get().Refresh();
                _ContactManager.Refresh();

                Android.Views.Animations.Animation anim_left_out = Android.Views.Animations.AnimationUtils.LoadAnimation(BaseContext, Resource.Animation.slide_left_out);
                Android.Views.Animations.Animation anim_left_in  = Android.Views.Animations.AnimationUtils.LoadAnimation(BaseContext, Resource.Animation.slide_left_in);
                anim_left_out.AnimationEnd += (sender2, e) =>
                {
                    dialogueLayout.Visibility = ViewStates.Gone;
                };

                contactLayout.Visibility = ViewStates.Visible;
                contactBtn.SetTypeface(contactBtn.Typeface, Android.Graphics.TypefaceStyle.Bold);
                dialogueBtn.SetTypeface(null, Android.Graphics.TypefaceStyle.Normal);

                dialogueLayout.StartAnimation(anim_left_out);
                contactLayout.StartAnimation(anim_left_in);
            };

            //메시지 버튼 클릭 시
            dialogueBtn.Click += (sender, o) =>
            {
                if (_CurrentPage == (int)MAINPAGETYPE.DIALOGUE)
                {
                    return;
                }
                _CurrentPage = (int)MAINPAGETYPE.DIALOGUE;

                Android.Views.Animations.Animation anim_right_out = Android.Views.Animations.AnimationUtils.LoadAnimation(BaseContext, Resource.Animation.slide_right_out);
                Android.Views.Animations.Animation anim_right_in  = Android.Views.Animations.AnimationUtils.LoadAnimation(BaseContext, Resource.Animation.slide_right_in);
                anim_right_out.AnimationEnd += (sender2, e) =>
                {
                    contactLayout.Visibility = ViewStates.Gone;
                };

                dialogueLayout.Visibility = ViewStates.Visible;
                dialogueBtn.SetTypeface(contactBtn.Typeface, Android.Graphics.TypefaceStyle.Bold);
                contactBtn.SetTypeface(null, Android.Graphics.TypefaceStyle.Normal);

                dialogueLayout.StartAnimation(anim_right_out);
                contactLayout.StartAnimation(anim_right_in);
            };
        }
Ejemplo n.º 4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            AppCenter.Start("aa8037b1-7b33-4856-ade1-94dc860bea06", typeof(Analytics), typeof(Crashes));
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            opciones = GetSharedPreferences(Legalproprefs, 0);
            if (opciones.GetString("nm_opr", "").Length > 0)
            {
                Intent intent = new Intent(this.ApplicationContext, typeof(Activity1));
                StartActivity(intent);
            }

            folder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);

            folder = System.IO.Path.Combine(folder, "legalprodb.db");
            ISharedPreferencesEditor editor = opciones.Edit();

            editor.PutString("db", folder);
            editor.Commit();

            conexiondb = new sqlite_database_movements();
            if (!System.IO.Directory.Exists(folder))
            {
                conexiondb.create_db(folder);
            }

            imagev    = FindViewById <ImageView>(Resource.Id.nube);
            animacion = Android.Views.Animations.AnimationUtils.LoadAnimation(this, Resource.Animation.movimientolento5p);
            animacion.Reset();
            imagev.StartAnimation(animacion);

            imagev    = FindViewById <ImageView>(Resource.Id.legalpro);
            animacion = Android.Views.Animations.AnimationUtils.LoadAnimation(this, Resource.Animation.movimientolento);
            animacion.Reset();
            imagev.StartAnimation(animacion);

            Button buton = FindViewById <Button>(Resource.Id.button);

            buton.Click += (sender, e) =>
            {
                animacion = Android.Views.Animations.AnimationUtils.LoadAnimation(this, Resource.Animation.pushb);
                buton.StartAnimation(animacion);
                //string numerot = Core.logincode.ToNumber(phoneNumbertext.Text);
                //resultado.Text = numerot;
                new System.Threading.Thread(new System.Threading.ThreadStart(() => {
                    Login();
                })).Start();
            };
        }
Ejemplo n.º 5
0
            public void OnAnimationStart(Android.Views.Animations.Animation animation)
            {
                if (_view == null)
                {
                    return;
                }
                var viewToItem = _viewToItemMap[_view];

                if (_isIn)
                {
                    viewToItem.View.Visibility      = ViewStates.Visible;
                    viewToItem.CloneView.Visibility = ViewStates.Gone;
                }
                else
                {
                    viewToItem.CloneView.Visibility = ViewStates.Gone;
                    viewToItem.View.Visibility      = ViewStates.Visible;
                }
            }
Ejemplo n.º 6
0
        private async void CheckIfSongIsPlaying()
        {
            if (!shouldCheck || !MiscTools.IsInForeground())
            {
                return;
            }
            if (notificationSong.Normal.Id == previousNtfSong.Normal.Id)
            {
                return;
            }

            Log(Type.Event, "Song playing is different, updating...");

            nowPlayingMode  = true;
            songInfo        = notificationSong;
            previousNtfSong = notificationSong;

            bool autoUpdate = Prefs.GetBoolean("auto_update_page", false);

            if (autoUpdate && nowPlayingMode)
            {
                shouldCheck = false;
                LoadSong();
            }
            else if (nowPlayingMode)
            {
                shouldCheck = false;

                Android.Views.Animations.Animation anim = Animations.BlinkingAnimation(700, 3);
                npTxt.StartAnimation(anim);
                Log(Type.Event, "Playing animation on npTxt");
            }
            else if (!nowPlayingMode)
            {
                shouldCheck = false;

                Android.Views.Animations.Animation anim = Animations.BlinkingImageAnimation(500, 4);
                shineView.Visibility = ViewStates.Visible;
                shineView.StartAnimation(anim);
                Log(Type.Event, "Playing animation on shineView");
            }
        }
Ejemplo n.º 7
0
        /// <summary>Initialize the specified context, attrs and style.</summary>
        /// <param name="context">Context.</param>
        /// <param name="attrs">Attrs.</param>
        /// <param name="style">Style.</param>
        private void Initialize(Context context, IAttributeSet attrs, int style)
        {
            if (attrs != null)
            {
                var styledAttributes = context.ObtainStyledAttributes(attrs, Resource.Styleable.SatelliteMenu, style, 0);
                Radius = styledAttributes.GetDimensionPixelSize(Resource.Styleable.SatelliteMenu_radius,
                                                                DEFAULT_RADIUS);
                ItemsAngle = styledAttributes.GetFloat(Resource.Styleable.SatelliteMenu_itemsAngle,
                                                       DEFAULT_ITEMS_ANGLE);
                CloseItemsOnClick = styledAttributes.GetBoolean(Resource.Styleable.SatelliteMenu_closeOnClick,
                                                                DEFAULT_CLOSE_ON_CLICK);
                Speed = styledAttributes.GetInt(Resource.Styleable.SatelliteMenu_speed,
                                                DEFAULT_SPEED);
                styledAttributes.Recycle();
            }
            _mainRotateLeft = PopoutAnimationFactory.CreateMainButtonAnimation(context);
            _mainRotateLeft.AnimationEnd +=

                (param0, param1) => _plusAnimationActive = false;
            _mainRotateRight = PopoutAnimationFactory.CreateMainButtonInverseAnimation(context);
            _mainRotateRight.AnimationStart +=

                (param0, param1) => _plusAnimationActive = false;
        }
Ejemplo n.º 8
0
 public void OnAnimationStart(Android.Views.Animations.Animation animation)
 {
 }
Ejemplo n.º 9
0
 public void OnAnimationRepeat(Android.Views.Animations.Animation animation)
 {
 }
Ejemplo n.º 10
0
 public void OnAnimationEnd(Android.Views.Animations.Animation animation)
 {
 }
Ejemplo n.º 11
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Mainwindow);
            // Create your application here
            opciones = GetSharedPreferences(Legalproprefs, 0);
            textv    = FindViewById <TextView>(Resource.Id.textView3);
            if (opciones.GetString("nm_opr", "").Length == 0)
            {
                Intent intent = new Intent(this.ApplicationContext, typeof(MainActivity));
                StartActivity(intent);
            }
            textv.Text = opciones.GetString("nm_opr", "Error");

            imageb        = FindViewById <ImageButton>(Resource.Id.descargar);
            imageb.Click += (sender, e) =>
            {
                Intent intent = new Intent(this.ApplicationContext, typeof(Showmodelos));
                StartActivity(intent);
            };
            animacion = Android.Views.Animations.AnimationUtils.LoadAnimation(this, Resource.Animation.movimientolento);
            animacion.Reset();
            imageb.StartAnimation(animacion);

            imageb        = FindViewById <ImageButton>(Resource.Id.lista);
            imageb.Click += (sender, e) =>
            {
                Intent intent = new Intent(this.ApplicationContext, typeof(Cuestionarios_guardados));
                StartActivity(intent);
            };
            animacion = Android.Views.Animations.AnimationUtils.LoadAnimation(this, Resource.Animation.movimientolento5p);
            animacion.Reset();
            imageb.StartAnimation(animacion);

            imageb        = FindViewById <ImageButton>(Resource.Id.nuevo);
            imageb.Click += (sender, e) =>
            {
                Intent intent = new Intent(this.ApplicationContext, typeof(Showmodelos));
                StartActivity(intent);
            };
            animacion = Android.Views.Animations.AnimationUtils.LoadAnimation(this, Resource.Animation.movimientolento);
            animacion.Reset();
            imageb.StartAnimation(animacion);

            pajaralogin        = FindViewById <ImageView>(Resource.Id.imageView4);
            pajaralogin.Click += (sender, e) =>
            {
                var builder = new AlertDialog.Builder(this);
                builder.SetTitle("Aviso");
                builder.SetMessage("Se cerrara la sesión ¿está seguro?");
                builder.SetPositiveButton("Aceptar", (sender2, args) => {
                    Toast.MakeText(this.ApplicationContext, "Adios", ToastLength.Long).Show();
                    //resultado.Text = respuesta.INSTANCIA.ID_INSTANCIA + " Operador: "+respuesta.id_Opr+" "+respuesta.nm_Oper;
                    ISharedPreferencesEditor editor = opciones.Edit();
                    editor.PutString("nm_opr", "");
                    editor.PutInt("id_opr", 0);
                    editor.PutString("nm_str", "");
                    editor.PutInt("instancia", 0);
                    editor.Commit();
                    StartActivity(typeof(MainActivity));
                });
                builder.SetNegativeButton("Cancelar", (sender2, args) => {
                });
                builder.Show();
            };
        }