Пример #1
0
 public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e)
 {
     base.OnViewModelChanged(sender, e);
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.NeedShowSendMenu))
     {
         if (ViewModel.NeedShowSendMenu)
         {
             inviteService.ShowMenu(imageButton);
             //inviteService.ShareLink("What kind of message?", ViewModel.GetInviteText);
             ViewModel.NeedShowSendMenu = false;
         }
     }
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.SubmitButtonAnimated))
     {
         if (ViewModel.SubmitButtonAnimated)
         {
             AnimateButton(imageButton, Resource.Drawable.ic_loadingIndicator);
         }
         if (!ViewModel.SubmitButtonAnimated)
         {
             imageButton.SetImageResource(Resource.Drawable.challenge_invite_btn);
             imageButton.ClearAnimation();
         }
     }
 }
Пример #2
0
 public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e)
 {
     base.OnViewModelChanged(sender, e);
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => (ViewModel as BaseChallengesViewModel).Challenge))
     {
         if ((ViewModel as BaseChallengesViewModel).Challenge != null && (ViewModel as BaseChallengesViewModel).Challenge.LocationLat != null && (ViewModel as BaseChallengesViewModel).Challenge.LocationLong != null && _map != null)
         {
             //ViewModel.RequiredLocation = true;
             GoogleMapHelper.UpdateMapZoom(_map, ViewModel.Challenge.LocationLat.Value, ViewModel.Challenge.LocationLong.Value, ViewModel.Challenge.RadiusMeters);
         }
         //else
         //    ViewModel.RequiredLocation = false;
     }
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.SubmitButtonAnimated))
     {
         if (ViewModel.SubmitButtonAnimated)
         {
             AnimateButton(button, Resource.Drawable.ic_loadingIndicator);
         }
         if (!ViewModel.SubmitButtonAnimated)
         {
             button.SetImageResource(Resource.Drawable.challenges_postering_btn);
             button.ClearAnimation();
         }
     }
 }
Пример #3
0
        public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnViewModelChanged(sender, e);
            if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.SubmitButtonAnimated))
            {
                if (ViewModel.SubmitButtonAnimated)
                {
                    AnimateButton(button, Resource.Drawable.ic_loadingIndicator);
                }
                if (!ViewModel.SubmitButtonAnimated)
                {
                    button.SetImageResource(Resource.Drawable.challenge_docsubmit_btn);
                    button.ClearAnimation();
                }
            }

            if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.Challenge))
            {
                if (ViewModel.Challenge != null && !string.IsNullOrEmpty(ViewModel.Challenge.Status) && ViewModel.Challenge.Status == ChallengesConstants.ChallengeStatusPending || ViewModel.Challenge.Status == ChallengesConstants.ChallengeStatusComplete)
                {
                    ViewModel.SubmitButtonHidden = true;
                }
                else
                {
                    ViewModel.SubmitButtonHidden = false;
                }
            }
        }
 public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e)
 {
     base.OnViewModelChanged(sender, e);
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.SubmitButtonImage))
     {
         if (ViewModel.GetSubmitButtonImageNormalName() != ViewModel.SubmitButtonImage)
         {
             AnimateImage(submitButton);
         }
         if (ViewModel.GetSubmitButtonImageNormalName() == ViewModel.SubmitButtonImage)
         {
             submitButton.ClearAnimation();
         }
     }
 }
Пример #5
0
 public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e)
 {
     base.OnViewModelChanged(sender, e);
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.SubmitButtonAnimated))
     {
         if (ViewModel.SubmitButtonAnimated)
         {
             AnimateButton(submitButton, Resource.Drawable.ic_loadingIndicator);
         }
         if (!ViewModel.SubmitButtonAnimated)
         {
             submitButton.SetImageResource(Resource.Drawable.challenges_fb_btn);
             submitButton.ClearAnimation();
         }
     }
 }
Пример #6
0
 public override void OnViewModelChanged(object sender, PropertyChangedEventArgs e)
 {
     base.OnViewModelChanged(sender, e);
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.IsBusy))
     {
         if (ViewModel.Challenge.IsFixedContent && !ViewModel.IsBusy)
         {
             photoGalleryService.UserImageWasAdded = true;
         }
     }
     if (e.PropertyName == PropertiesExtension.GetPropertyName(() => ViewModel.SubmitButtonAnimated))
     {
         if (ViewModel.SubmitButtonAnimated)
         {
             AnimateButton(button, Resource.Drawable.ic_loadingIndicator);
         }
         if (!ViewModel.SubmitButtonAnimated)
         {
             button.SetImageResource(Resource.Drawable.challenges_photo_btn);
             button.ClearAnimation();
         }
     }
 }
Пример #7
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view = base.OnCreateView(inflater, container, savedInstanceState);
            parallaxScrollView = view.FindViewById <ScrollView>(Resource.Id.parallax_scroll_view);
            parallaxImage      = view.FindViewById <ImageView>(Resource.Id.parallax_image);
            parallaxScrollView.SetOnScrollChangeListener(this);
            UndateControls();
            submitButton = view.FindViewById <ImageButton>(Resource.Id.submit_button);
            view.FindViewById <ImageButton>(Resource.Id.submit_button).Click += async(s, e) => {
                AnimateButton(submitButton, Resource.Drawable.ic_loadingIndicator);
                submitButton.Enabled = false;
                await ViewModel.ChallengeSubmit(this.Activity);

                submitButton.SetImageResource(Resource.Drawable.challenges_fb_btn);
                submitButton.ClearAnimation();
                submitButton.Enabled = true;
            };
            //_webView = view.FindViewById<WebView>(Resource.Id.web_view);
            //WebSettings webSettings = _webView.Settings;
            //webSettings.TextZoom = 85;

            AnimateImage(loader);
            return(view);
        }