Beispiel #1
0
        public override void OnBindListViewHolder(ListViewHolder p0, int p1)
        {
            MyCustomViewHolder customVH = (MyCustomViewHolder)p0;
            Object             item     = GetItem(p1);

            customVH.txtItemText.Text = item.ToString();
        }
        public override ListViewHolder OnCreateSwipeContentHolder(ViewGroup viewGroup)
        {
            LayoutInflater inflater         = LayoutInflater.From(viewGroup.Context);
            View           swipeContentView = inflater.Inflate(Resource.Layout.example_list_view_swipe_content, viewGroup, false);
            ListViewHolder vh = new ListViewHolder(swipeContentView);

            return(vh);
        }
Beispiel #3
0
        public override void OnBindListViewHolder(ListViewHolder holder, int position)
        {
            FoodiPlaceViewHolder viewHolder = (FoodiPlaceViewHolder)holder;
            Results foodiPlace = (Results)Items[position];

            viewHolder.txtNameFoodiPlaces.Text = foodiPlace.poi.name;
            Glide.With(context).Load(int.Parse(foodiPlace.info)).Into(viewHolder.imvFoodiPlaces);
        }
        public override void OnBindListViewHolder(ListViewHolder p0, int p1)
        {
            SwipeToExecuteCustomViewHolder customVH = (SwipeToExecuteCustomViewHolder)p0;
            EmailMessage message = (EmailMessage)this.GetItem(p1);

            customVH.txtTitle.Text   = message.title;
            customVH.txtContent.Text = message.content;
        }
Beispiel #5
0
        public override void OnBindListViewHolder(ListViewHolder holder, int position)
        {
            base.OnBindListViewHolder(holder, position);

            int size = 200 + (position % 5) * 50;

            holder.ItemView.LayoutParameters = new FrameLayout.LayoutParams(size, size);
        }
            public override void OnBindItemViewHolder(ListViewHolder holder, Java.Lang.Object entity)
            {
                ItemViewHolder   vh   = (ItemViewHolder)holder;
                ShoppingListItem item = (ShoppingListItem)entity;

                vh.txtItemCategory.Text = Java.Lang.String.Format("Category: %s", item.category);
                vh.txtItemName.Text     = item.name;
                vh.txtItemPrice.Text    = Java.Lang.String.Format("Price: $%d", item.price);
            }
        public override void OnBindListViewHolder(ListViewHolder holder, int position)
        {
            CountryViewHolder vh = (CountryViewHolder) holder;
            Country item = (Country) GetItem(position);

            vh.txtName.Text = item.name;
            vh.txtCapital.Text = Java.Lang.String.Format("Capital: %s", item.capital);
            vh.txtPopulation.Text = Java.Lang.String.Format("Population: %,d", item.population);
        }
        public override void OnBindListViewHolder(ListViewHolder holder, int position)
        {
            CountryViewHolder vh   = (CountryViewHolder)holder;
            Country           item = (Country)GetItem(position);

            vh.txtName.Text       = item.name;
            vh.txtCapital.Text    = Java.Lang.String.Format("Capital: %s", item.capital);
            vh.txtPopulation.Text = Java.Lang.String.Format("Population: %,d", item.population);
        }
Beispiel #9
0
        public override void OnBindSwipeContentHolder(ListViewHolder viewHolder, int position)
        {
            EmailMessage currentMessage = (EmailMessage)GetItem(position);
            SwipeActionsThresholdsViewHolder swipeContentHolder = (SwipeActionsThresholdsViewHolder)viewHolder;

            swipeContentHolder.action1.SetOnClickListener(new ViewHolderActionClickListener(swipeContentHolder, position, sab, this));

            swipeContentHolder.action2.SetOnClickListener(new ViewHolderActionClickListener(swipeContentHolder, position, sab, this));
        }
        public override void OnBindSwipeContentHolder(ListViewHolder viewHolder, int position)
        {
            View swipeContent = viewHolder.ItemView;

            EmailMessage currentDataItem = (EmailMessage)this.GetItem(position);
            Button       action1         = (Button)swipeContent.FindViewById(Resource.Id.btnAction1);
            Button       action2         = (Button)swipeContent.FindViewById(Resource.Id.btnAction2);

            action1.Text = "Archive " + currentDataItem.title;
            action2.Text = "Delete " + currentDataItem.title;
        }
Beispiel #11
0
        public override SupportRecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View item = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.search_list_item, parent, false);

            TextView          itemName   = item.FindViewById <TextView>(Resource.Id.searchName);
            TextView          itemEmail  = item.FindViewById <TextView>(Resource.Id.searchEmail);
            CircularImageView itemAvatar = item.FindViewById <CircularImageView>(Resource.Id.searchAvatar);

            ListViewHolder view = new ListViewHolder(item, activity, MeritMoneyUsers)
            {
                Name = itemName, Email = itemEmail, Avatar = itemAvatar
            };

            return(view);
        }
Beispiel #12
0
        public override void OnBindListViewHolder(ListViewHolder holder, int pos)
        {
            DistrictViewHolder vh       = (DistrictViewHolder)holder;
            District           district = (District)Items[pos];

            vh.txtDistrictName.Text = district.Name;

            vh.txtDistrictName.Click += (s, e) =>
            {
                activity.lnProgressBar.Visibility = ViewStates.Visible;
                Intent i = new Intent(activity, typeof(FoodiPlacesActivity));
                i.PutExtra(Constants.LatLon, districts[pos].LatLon);
                i.PutExtra(Constants.Name, districts[pos].Name);
                activity.StartActivity(i);
            };
            activity.lnProgressBar.Visibility = ViewStates.Gone;
        }
Beispiel #13
0
        public override void OnBindViewHolder(SupportRecyclerView.ViewHolder holder, int position)
        {
            ListViewHolder Holder = holder as ListViewHolder;

            Holder.Name.Text  = MeritMoneyUsers[position].name;
            Holder.Email.Text = MeritMoneyUsers[position].email;

            //if (MeritMoneyUsers[position].AvatarIsDefault)
            //{
            //Bitmap bitmap = Bitmap.CreateBitmap(AdditionalFunctions.ConvertDpToPx(AvatarSize),
            //AdditionalFunctions.ConvertDpToPx(AvatarSize), Bitmap.Config.Argb8888);

            //Bitmap avatar = AdditionalFunctions.DrawTextToBitmap(bitmap,
            //    AdditionalFunctions.DefineInitials(MeritMoneyUsers[position].name),
            //    AdditionalFunctions.ConvertDpToPx(AvatarSize / 3));

            //MeritMoneyUsers[position].image = avatar;
            //}

            Holder.Avatar.SetImageBitmap(MeritMoneyUsers[position].image);
        }
            public override void OnBindListViewHolder(ListViewHolder holder, int position)
            {
                base.OnBindViewHolder(holder, position);

                int id = (position % 5) + 1;

                switch (id)
                {
                case 1: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#F44336")); break;

                case 2: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#9C27B0")); break;

                case 3: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#2196F3")); break;

                case 4: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#00BCD4")); break;

                case 5: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#CDDC39")); break;
                }
                int size = 200 + id * 50;

                holder.ItemView.LayoutParameters = new FrameLayout.LayoutParams(size, size);
            }
        protected async override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.JobListAdmin);

            if (holder == null)
            {
                holder = new ListViewHolder();
            }

            SetHolderViews();

            AssignClickEvents();

            var employeeTask = await Shared.GetEmployeesAsync(this);

            Shared.GetJobsAsync(this);

            SetViewAdapter();

            Shared.jobListAdapterAdmin.NotifyDataSetChanged();
        }
Beispiel #16
0
		public override void OnBindListViewHolder(ListViewHolder holder, int position)
		{
			ImageViewHolder vh = (ImageViewHolder)holder;
			ImagenCamp item = (ImagenCamp)GetItem(position);

			vh.txtDescription.TextFormatted = Html.FromHtml(item.Descripcion);
			vh.txtDescription.SetTextColor(Color.ParseColor("#616161"));
			//vh.txtDescription.Typeface = Typeface.CreateFromAsset(ctx.Assets, "fonts/ArcherMediumPro.otf");
			vh.txtDescription.SetTextSize(ComplexUnitType.Fraction, Configuration.getHeight(32));
			//vh.txtDescription.SetBackgroundColor(Color.ParseColor("#E6E6E6"));

			// load image as Drawable
			//Drawable d = new BitmapDrawable(getBitmapFromAssets(item.image));
			// set image to ImageView
			//vh.Imagen.SetImageDrawable(d);

			vh.Imagen.SetMinimumWidth(Configuration.getWidth(640));
			vh.Imagen.SetMinimumHeight(Configuration.getHeight(427));
			Picasso.With(ctx).Load(item.image).Placeholder(ctx.Resources.GetDrawable(Resource.Drawable.progress_animation)).Resize(Configuration.getWidth(640), Configuration.getHeight(427)).CenterCrop().Into(vh.Imagen);



		}
            public override View GetView(int position, View convertView, ViewGroup parent)
            {
                ApplicationItem item = appItems[position];

                ListViewHolder listViewHolder = null;

                if (convertView != null)
                {
                    listViewHolder = convertView.Tag as ListViewHolder;
                }

                if (listViewHolder == null)
                {
                    listViewHolder = new ListViewHolder();

                    convertView = activity.LayoutInflater.Inflate(Resource.Layout.package_chooser_item, null);

                    listViewHolder.itemIcon        = convertView.FindViewById <ImageView>(Resource.Id.packages_picker_item_icon);
                    listViewHolder.itemCheckbox    = convertView.FindViewById <CheckBox>(Resource.Id.packages_picker_item_selection);
                    listViewHolder.itemTitle       = convertView.FindViewById <TextView>(Resource.Id.packages_picker_item_title);
                    listViewHolder.itemDescription = convertView.FindViewById <TextView>(Resource.Id.packages_picker_item_description);

                    convertView.Tag = listViewHolder;
                }

                listViewHolder.itemIcon.SetImageDrawable(item.Icon);

                listViewHolder.itemCheckbox.Checked   = item.Selected;
                listViewHolder.itemCheckbox.Clickable = false;
                listViewHolder.itemCheckbox.Selected  = false;

                listViewHolder.itemTitle.Text = item.Title;

                listViewHolder.itemDescription.Text = item.Description;

                return(convertView);
            }
Beispiel #18
0
            public override View GetView(int position, View convertView, ViewGroup parent)
            {
                ListViewHolder listViewHolder = null;

                if (convertView != null)
                {
                    listViewHolder = convertView.Tag as ListViewHolder;
                }

                if (listViewHolder == null)
                {
                    listViewHolder = new ListViewHolder();

                    convertView = activity.LayoutInflater.Inflate(Resource.Layout.log_activity_listitem, null);

                    listViewHolder.txtLogEntry = convertView.FindViewById <TextView>(Resource.Id.log_entry);

                    convertView.Tag = listViewHolder;
                }

                listViewHolder.txtLogEntry.TextFormatted = logEntry[position];

                return(convertView);
            }
Beispiel #19
0
        public override void OnBindListViewHolder(ListViewHolder holder, int position)
        {
            FoodiPlaceViewHolder viewHolder = (FoodiPlaceViewHolder)holder;
            Review review = (Review)Items[position];

            viewHolder.Name.Text   = review.Name;
            viewHolder.Date.Text   = review.Date.ToShortDateString();
            viewHolder.Detail.Text = review.Detail;

            viewHolder.Score.Precision   = Precision.Exact;
            viewHolder.Score.ReadOnly    = true;
            viewHolder.Score.ItemSize    = 10;
            viewHolder.Score.ItemSpacing = 4;
            viewHolder.Score.Value       = review.Score;
            SfRatingSettings ratingSettings = new SfRatingSettings
            {
                RatedFill     = Color.Yellow,
                UnRatedFill   = Color.Gray,
                RatedStroke   = Color.DarkOrange,
                UnRatedStroke = Color.DarkGray
            };

            viewHolder.Score.RatingSettings = ratingSettings;
        }
        protected async override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.JobList);

            if (holder == null)
            {
                holder = new ListViewHolder();
            }

            SetHolderViews();

            AssignClickEvents();

            Shared.GetJobsAsync(this);

            if (Shared.jobList.Count > 0)
            {
                SetViewAdapter();

                Shared.jobListAdapter.NotifyDataSetChanged();
            }
        }
 public override void OnBindItemViewHolder(ListViewHolder holder, Java.Lang.Object entity)
 {
     ItemViewHolder vh = (ItemViewHolder) holder;
     ShoppingListItem item = (ShoppingListItem) entity;
     vh.txtItemCategory.Text = Java.Lang.String.Format("Category: %s", item.category);
     vh.txtItemName.Text = item.name;
     vh.txtItemPrice.Text = Java.Lang.String.Format("Price: $%d", item.price);
 }
 public override void OnBindGroupViewHolder(ListViewHolder holder, Java.Lang.Object groupKey)
 {
     GroupItemViewHolder vh = (GroupItemViewHolder) holder;
     vh.txtGroupHeader.Text = groupKey.ToString().ToUpper();
 }
        public override void OnBindListViewHolder(ListViewHolder holder, int position)
        {
            base.OnBindListViewHolder (holder, position);

            int size = 200 + (position % 5) * 50;
            holder.ItemView.LayoutParameters = new FrameLayout.LayoutParams(size, size);
        }
            public override void OnBindGroupViewHolder(ListViewHolder holder, Java.Lang.Object groupKey)
            {
                GroupItemViewHolder vh = (GroupItemViewHolder)holder;

                vh.txtGroupHeader.Text = groupKey.ToString().ToUpper();
            }
Beispiel #25
0
        public override void OnBindListViewHolder(ListViewHolder p0, int p1)
        {
            MyCustomViewHolder customVH = (MyCustomViewHolder)p0;

            customVH.txtItemText.Text = p1.ToString();
        }
 public override void OnBindListViewHolder(ListViewHolder p0, int p1)
 {
     SwipeToExecuteCustomViewHolder customVH = (SwipeToExecuteCustomViewHolder) p0;
     EmailMessage message = (EmailMessage)this.GetItem( p1);
     customVH.txtTitle.Text = message.title;
     customVH.txtContent.Text = message.content;
 }
        public override void OnBindSwipeContentHolder(ListViewHolder viewHolder, int position)
        {
            View swipeContent = viewHolder.ItemView;

            EmailMessage currentDataItem = (EmailMessage) this.GetItem(position);
            Button action1 = (Button) swipeContent.FindViewById(Resource.Id.btnAction1);
            Button action2 = (Button) swipeContent.FindViewById(Resource.Id.btnAction2);

            action1.Text = "Archive " + currentDataItem.title;
            action2.Text = "Delete " + currentDataItem.title;
        }
 public override ListViewHolder OnCreateSwipeContentHolder(ViewGroup viewGroup)
 {
     LayoutInflater inflater = LayoutInflater.From(viewGroup.Context);
     View swipeContentView = inflater.Inflate(Resource.Layout.example_list_view_swipe_content, viewGroup, false);
     ListViewHolder vh = new ListViewHolder(swipeContentView);
     return vh;
 }
        public override void OnBindSwipeContentHolder(ListViewHolder viewHolder, int position)
        {
            View swipeContent = viewHolder.ItemView;

            EmailMessage currentDataItem = (EmailMessage)this.GetItem(position);
        }
 public override void OnBindListViewHolder(ListViewHolder p0, int p1)
 {
     MyCustomViewHolder customVH = (MyCustomViewHolder) p0;
     Object item = GetItem (p1);
     customVH.txtItemText.Text = item.ToString();
 }
Beispiel #31
0
        public override void OnBindListViewHolder(ListViewHolder p0, int p1)
        {
            LayoutsViewHolder customVH = (LayoutsViewHolder)p0;

            customVH.txtItemText.Text = this.GetItem(p1).ToString();
        }
 public override void OnBindListViewHolder(ListViewHolder p0, int p1)
 {
     LayoutsViewHolder customVH = (LayoutsViewHolder)p0;
     customVH.txtItemText.Text = this.GetItem(p1).ToString();
 }
 public override void OnBindListViewHolder(ListViewHolder p0, int p1)
 {
     MyCustomViewHolder customVH = (MyCustomViewHolder) p0;
     customVH.txtItemText.Text = p1.ToString();
 }
            public override void OnBindListViewHolder(ListViewHolder holder, int position)
            {
                base.OnBindViewHolder(holder, position);

                int id = (position % 5) + 1;
                switch (id) {
                    case 1: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#F44336"));break;
                    case 2: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#9C27B0"));break;
                    case 3: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#2196F3"));break;
                    case 4: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#00BCD4"));break;
                    case 5: holder.ItemView.SetBackgroundColor(Android.Graphics.Color.ParseColor("#CDDC39"));break;
                }
                int size = 200 + id*50;

                holder.ItemView.LayoutParameters = new FrameLayout.LayoutParams(size, size);
            }
        public override void OnBindListViewHolder(ListViewHolder p0, int position)
        {
            SwipeToExecuteCustomViewHolder customVH = (SwipeToExecuteCustomViewHolder)p0;

            customVH.tvTitle.Text = mViewModel.Buckets[position];
        }