public override View GetView(int position, View convertView, ViewGroup parent) { int placeholder = 0; adaptadorlistaremotoViewHolder holder = null; if (newplaceholder != 0) { placeholder = newplaceholder; } else { placeholder = Resource.Drawable.image; } if (convertView != null) { holder = convertView.Tag as adaptadorlistaremotoViewHolder; } if (holder == null) { holder = new adaptadorlistaremotoViewHolder(); var inflater = context.GetSystemService(Context.LayoutInflaterService).JavaCast <LayoutInflater>(); //replace with your item and your holder items //comment back in convertView = inflater.Inflate(Resource.Layout.layoutlistaplayerindependiente, parent, false); holder.Title = convertView.FindViewById <TextView>(Resource.Id.textView1); holder.portrait = convertView.FindViewById <ImageView>(Resource.Id.imageView1); // view.SetBackgroundResource(Resource.Drawable.drwaablegris); convertView.Tag = holder; /* if (links.Contains("")) * { * links.Remove(""); * }*/ holder.portrait.SetTag(Resource.Id.imageView1, links[position]); if (linkactual == null || linkactual.Trim() == "") { if (links[position].Trim() != "") { Glide.With(context) .Load("http://i.ytimg.com/vi/" + links[position].Split('=')[1] + "/mqdefault.jpg") .Apply(RequestOptions.CircleCropTransform().Placeholder(placeholder)) .Into(holder.portrait); } else { Glide.With(context) .Load("") .Apply(RequestOptions.CircleCropTransform().Placeholder(placeholder)) .Into(holder.portrait); } } else { if (linkactual.Split('=')[1] == links[position].Split('=')[1]) { Glide.With(context) .Load("https://raw.githubusercontent.com/Gr3gorywolf/Multitube.android/master/Updates/playinganimation.gif") .Apply(RequestOptions.NoTransformation().Placeholder(placeholder)) .Into(holder.portrait); } else { Glide.With(context) .Load("http://i.ytimg.com/vi/" + links[position].Split('=')[1] + "/mqdefault.jpg") .Apply(RequestOptions.CircleCropTransform().Placeholder(placeholder)) .Into(holder.portrait); } } } // Console.WriteLine(linkactual + ">>>" + links[position]); if (holder.portrait.GetTag(Resource.Id.imageView1).ToString() != links[position]) { try { if (linkactual == null || linkactual.Trim() == "") { if (links[position].Trim() != "") { Glide.With(context) .Load("http://i.ytimg.com/vi/" + links[position].Split('=')[1] + "/mqdefault.jpg") .Apply(RequestOptions.CircleCropTransform().Placeholder(placeholder)) .Into(holder.portrait); } else { Glide.With(context) .Load("") .Apply(RequestOptions.CircleCropTransform().Placeholder(placeholder)) .Into(holder.portrait); } } else { if (linkactual.Split('=')[1] == links[position].Split('=')[1]) { Glide.With(context) .Load("https://raw.githubusercontent.com/Gr3gorywolf/Multitube.android/master/Updates/playinganimation.gif") .Apply(RequestOptions.NoTransformation().Placeholder(placeholder)) .Into(holder.portrait); } else { Glide.With(context) .Load("http://i.ytimg.com/vi/" + links[position].Split('=')[1] + "/mqdefault.jpg") .Apply(RequestOptions.CircleCropTransform().Placeholder(placeholder)) .Into(holder.portrait); } } } catch (Exception) { } } holder.Title.Text = nombres[position].Replace(">", "").Replace("<", ""); // holder.animar3((View)convertView); holder.portrait.SetTag(Resource.Id.imageView1, links[position]); //fill in your items //holder.Title.Text = "new text here"; /// clasesettings.recogerbasura(); return(convertView); }
public void OnDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) { var date = new DateTime(year, monthOfYear + 1, dayOfMonth); View.FindViewById <TextView>(Resource.Id.dateTextView).Text = "Sa valisid: " + date.ToString("yyyy-MMM-dd"); }