public override View GetView(int position, View convertView, ViewGroup parent) { var view = convertView ?? CurrentActivity.LayoutInflater.Inflate(Resource.Layout.item_image_view_dictionary, parent, false); var TextView = view.FindViewById <TextView>(Resource.Id.textView_item_view_dictionary); var ImageView = view.FindViewById <ImageView>(Resource.Id.imageView_item_view_dictionary); using (var his = Application.Context.Assets.Open($"Image{DataBase.TableName}Mini/{List[position].Image_name}.jpg")) { var bitmap = BitmapFactory.DecodeStream(his); ImageView.SetImageBitmap(bitmap); } BackgroundConstructor.SetColorForItems(List[position].NumberLearn, TextView); if (Settings.Currentlanguage == $"{Language.en}") { TextView.Text = List[position].Name_image_en; } else { TextView.Text = List[position].Name_image_ru; } return(view); }
public override View GetView(int position, View convertView, ViewGroup parent) { var view = convertView ?? CurrentActivity.LayoutInflater.Inflate(Resource.Layout.item_languages_view_dictionary, parent, false); var textView = view.FindViewById <TextView>(Resource.Id.item_view_dictionary); BackgroundConstructor.SetColorForItems(List[position].NumberLearn, textView); textView.Text = $"{List[position].Word} - {List[position].TranslationWord}"; return(view); }