Example #1
0
 protected override void BindBindableView(object source, IMvxListItemView viewToUse)
 {
     if (viewToUse != null && viewToUse.Content != null && source != null)
     {
         viewToUse.Content.FindViewById <RelativeLayout>(Resource.Id.image_view).Visibility = ((source as LocalChallengeAnswerModel).IsSelected ? ViewStates.Visible : ViewStates.Gone);
     }
     base.BindBindableView(source, viewToUse);
 }
Example #2
0
 protected override void BindBindableView(object source, IMvxListItemView viewToUse)
 {
     if (viewToUse != null && viewToUse.Content != null && source != null)
     {
         var image = viewToUse.Content.FindViewById <ImageView>(Resource.Id.selected_image);
         image.Visibility = ((source as LocalContactModel).IsSelected ? ViewStates.Visible : ViewStates.Gone);
         image.SetColorFilter(new Color(ContextCompat.GetColor(Application.Context, Resource.Color.Black)), PorterDuff.Mode.SrcIn);
     }
     base.BindBindableView(source, viewToUse);
 }
        protected override void BindBindableView(object source, IMvxListItemView viewToUse)
        {
            if (listItems.Count == 0)
            {
                SetListItems();
            }
            var currentIndex = listItems.IndexOf(source as LocalFriendModel);

            if (currentIndex == VisibleItemsCount - 1 && currentIndex < UserPosition)
            {
                source = listItems[UserPosition];
            }
            //var userPhoto = viewToUse.Content.FindViewById<MvvmCross.Droid.Support.V7.AppCompat.Widget.MvxAppCompatImageView>(Resource.Id.user_photo);
            //if (userPhoto != null)
            //{
            //    SetUserAnimatedImage(userPhoto, source as LocalFriendModel);
            //    (source as LocalFriendModel).IsSelected = false;
            //}
            base.BindBindableView(source, viewToUse);
        }
Example #4
0
        protected override void BindBindableView(object source, IMvxListItemView viewToUse)
        {
            base.BindBindableView(source, viewToUse);

            var sctionView  = viewToUse.Content.FindViewById <LinearLayout>(Resource.Id.section_view);
            var sectionText = viewToUse.Content.FindViewById <TextView>(Resource.Id.section_title);
            var oval        = viewToUse.Content.FindViewById <ImageView>(Resource.Id.ic_oval);

            sctionView.Visibility = ViewStates.Gone;
            if (sectionPosition.ContainsKey("my_areas") && sectionPosition["my_areas"] == (source as LocalAreaModel).areaID)
            {
                sectionText.Text      = "My Areas";
                sctionView.Visibility = ViewStates.Visible;
            }
            if (sectionPosition.ContainsKey("suggested_areas") && sectionPosition["suggested_areas"] == (source as LocalAreaModel).areaID)
            {
                sectionText.Text      = "Suggested Areas";
                sctionView.Visibility = ViewStates.Visible;
            }
            if (!(source as LocalAreaModel).IsSuggestedArea && !sectionPosition.ContainsKey("my_areas"))
            {
                sectionText.Text      = "My Areas";
                sctionView.Visibility = ViewStates.Visible;
                sectionPosition.Add("my_areas", (source as LocalAreaModel).areaID);
            }
            if ((source as LocalAreaModel).IsSuggestedArea && !sectionPosition.ContainsKey("suggested_areas"))
            {
                sectionText.Text      = "Suggested Areas";
                sctionView.Visibility = ViewStates.Visible;
                sectionPosition.Add("suggested_areas", (source as LocalAreaModel).areaID);
            }
            if (!(source as LocalAreaModel).IsSuggestedArea)
            {
                oval.SetColorFilter(Android.Graphics.Color.ParseColor("#22F3D1"));
            }
            if ((source as LocalAreaModel).IsSuggestedArea)
            {
                oval.SetColorFilter(Android.Graphics.Color.ParseColor("#F2FA98"));
            }
            UpdateControls(sectionText, viewToUse.Content.FindViewById <TextView>(Resource.Id.description_text), viewToUse.Content.FindViewById <TextView>(Resource.Id.title_text));
        }
 protected override void BindBindableView(object source, IMvxListItemView viewToUse)
 {
     throw new MvxException(
         @"BindBindableView with IMvxListItemView should not be called for layout list items");
 }
Example #6
0
 protected override void BindBindableView(object source, IMvxListItemView viewToUse)
 {
     base.BindBindableView(source as T, viewToUse);
 }
Example #7
0
 protected virtual void BindBindableView(object source, IMvxListItemView viewToUse)
 {
     viewToUse.DataContext = source;
 }
 protected virtual void BindBindableView(object source, IMvxListItemView viewToUse)
 {
     viewToUse.DataContext = source;
 }
Example #9
0
 protected override void BindBindableView(object source, IMvxListItemView viewToUse)
 {
     throw new MvxException(
               @"BindBindableView with IMvxListItemView should not be called for layout list items");
 }