public UserProfileViewHolder(View itemView, Action <int> listener, Action <int> choose_photoIVClickListener, Action <int> settingsClick, Action <int> editClick, Action <int> editSkillClick, Action <int> feedbackClick, Action <int> OnImageClick, Action <int> GoToReviewsClick, Activity _context) : base(itemView) { this._context = _context; go_to_my_reviewsLL = itemView.FindViewById <LinearLayout>(Resource.Id.go_to_my_reviewsLL); profile_image = itemView.FindViewById <ImageView>(Resource.Id.profile_image); choose_photoIV = itemView.FindViewById <ImageView>(Resource.Id.choose_photoIV); settingsIV = itemView.FindViewById <ImageView>(Resource.Id.settingsIV); add_skillIV = itemView.FindViewById <ImageView>(Resource.Id.add_skillIV); edit_skillIV = itemView.FindViewById <ImageView>(Resource.Id.edit_skillIV); edit_skillRL = itemView.FindViewById <RelativeLayout>(Resource.Id.edit_skillRL); headerRL = itemView.FindViewById <RelativeLayout>(Resource.Id.headerRL); gridLL = itemView.FindViewById <LinearLayout>(Resource.Id.gridLL); tintLL = itemView.FindViewById <LinearLayout>(Resource.Id.tintLL); editBn = itemView.FindViewById <Button>(Resource.Id.editBn); onlyWithReviewsS = itemView.FindViewById <Switch>(Resource.Id.onlyWithReviewsS); onlineValueTV = itemView.FindViewById <TextView>(Resource.Id.onlineValue_TV); star1IV = itemView.FindViewById <ImageView>(Resource.Id.star1IV); star2IV = itemView.FindViewById <ImageView>(Resource.Id.star2IV); star3IV = itemView.FindViewById <ImageView>(Resource.Id.star3IV); star4IV = itemView.FindViewById <ImageView>(Resource.Id.star4IV); star5IV = itemView.FindViewById <ImageView>(Resource.Id.star5IV); rating_valueTV = itemView.FindViewById <TextView>(Resource.Id.rating_valueTV); expertNameTV = itemView.FindViewById <TextView>(Resource.Id.expertNameTV); feedbackRL = itemView.FindViewById <RelativeLayout>(Resource.Id.feedbackRL); skillNameTV = itemView.FindViewById <TextView>(Resource.Id.skillNameTV); description_text_dataTV = itemView.FindViewById <TextView>(Resource.Id.description_text_dataTV); reviewCountTV = itemView.FindViewById <TextView>(Resource.Id.reviewCountTV); dsadas = itemView.FindViewById <TextView>(Resource.Id.dsadas); sdsddsddddwww = itemView.FindViewById <TextView>(Resource.Id.sdsddsddddwww); textView1 = itemView.FindViewById <TextView>(Resource.Id.textView1); textVsiew1 = itemView.FindViewById <TextView>(Resource.Id.textVsiew1); linearLayout3 = itemView.FindViewById <RelativeLayout>(Resource.Id.linearLayout31); choose_photoIV.Click += (sender, e) => choose_photoIVClickListener(base.AdapterPosition); itemView.Click += (s, e) => listener(Position); settingsIV.Click += (s, e) => settingsClick(Position); editBn.Click += (s, e) => editClick(Position); edit_skillRL.Click += (s, e) => editSkillClick(Position); feedbackRL.Click += (s, e) => feedbackClick(Position); profile_image.Click += (s, e) => OnImageClick(Position); onlyWithReviewsS.CheckedChange += async delegate { if (onlyWithReviewsS.Checked) { onlineValueTV.Text = _context.GetString(Resource.String.online_text); onlineValueTV.SetTextColor(Color.Green); var res = await profileAndExpertMethods.EditMyOnline(userMethods.GetUsersAuthToken(), true); } else { onlineValueTV.SetTextColor(Color.Red); onlineValueTV.Text = _context.GetString(Resource.String.offline_text); var res = await profileAndExpertMethods.EditMyOnline(userMethods.GetUsersAuthToken(), false); } }; go_to_my_reviewsLL.Click += (s, e) => GoToReviewsClick(Position); }
public UserProfileExpandableGroupHolder(View view, Action <int> groupClickListener, Action <int> settingsClick, Action <int> editClick, Action <int> choose_photoIVClickListener, Action <int> OnImageClick, Action <int> feedbackClick, Action <int> reviews_by_meClick, Action <int> about_meClick, Activity context) : base(view) { profile_image = view.FindViewById <ImageView>(Resource.Id.profile_image); this.bttGroup = (ImageView)view.FindViewById(Resource.Id.group_bttClick); this.itemRL = (RelativeLayout)view.FindViewById(Resource.Id.itemRL); this.headerRL = (RelativeLayout)view.FindViewById(Resource.Id.headerRL); this.profile_imageIV = (ImageView)view.FindViewById(Resource.Id.profile_image); this.skillNameTV = (TextView)view.FindViewById(Resource.Id.skillNameTV); this.expert_nameTV = (TextView)view.FindViewById(Resource.Id.expertNameTV); this.expertSurnameTV = (TextView)view.FindViewById(Resource.Id.expertSurnameTV); this.expert_phoneTV = (TextView)view.FindViewById(Resource.Id.expert_phoneTV); this.cityTV = (TextView)view.FindViewById(Resource.Id.cityTV); this.distanceTV = (TextView)view.FindViewById(Resource.Id.distanceTV); this.onlineIV = (ImageView)view.FindViewById(Resource.Id.onlineIV); this.onlineValueTV = (TextView)view.FindViewById(Resource.Id.onlineValue_TV); this.reviewCountTV = (TextView)view.FindViewById(Resource.Id.reviewCountTV); this.onlyWithReviewsS = (Switch)view.FindViewById(Resource.Id.onlyWithReviewsS); aboutMeRL = (RelativeLayout)view.FindViewById(Resource.Id.aboutMeRL); dsadas = (TextView)view.FindViewById(Resource.Id.dsadas); sdsddsddddwww = (TextView)view.FindViewById(Resource.Id.sdsddsddddwww); sdsddsddddwwwwww = (TextView)view.FindViewById(Resource.Id.sdsddsddddwwwwww); feedbackRL = (RelativeLayout)view.FindViewById(Resource.Id.feedbackRL); go_to_my_reviewsLL = (RelativeLayout)view.FindViewById(Resource.Id.go_to_my_reviewsLL); choose_photoIV = view.FindViewById <ImageView>(Resource.Id.choose_photoIV); editBn = view.FindViewById <Button>(Resource.Id.editBn); settingsIV = view.FindViewById <ImageView>(Resource.Id.settingsIV); star1IV = view.FindViewById <ImageView>(Resource.Id.star1IV); star2IV = view.FindViewById <ImageView>(Resource.Id.star2IV); star3IV = view.FindViewById <ImageView>(Resource.Id.star3IV); star4IV = view.FindViewById <ImageView>(Resource.Id.star4IV); star5IV = view.FindViewById <ImageView>(Resource.Id.star5IV); rating_valueTV = view.FindViewById <TextView>(Resource.Id.rating_valueTV); bottom_separatorLL = (LinearLayout)view.FindViewById(Resource.Id.bottom_separatorLL); writeRL = (RelativeLayout)view.FindViewById(Resource.Id.writeRL); callRL = (RelativeLayout)view.FindViewById(Resource.Id.callRL); writeTV = (TextView)view.FindViewById(Resource.Id.writeTV); callTV = (TextView)view.FindViewById(Resource.Id.callTV); textView3 = (TextView)view.FindViewById(Resource.Id.textView3); this.context = context; view.Click += (sender, e) => groupClickListener(base.AdapterPosition); settingsIV.Click += (sender, e) => settingsClick(base.AdapterPosition); editBn.Click += (s, e) => editClick(Position); choose_photoIV.Click += (s, e) => choose_photoIVClickListener(Position); profile_image.Click += (s, e) => OnImageClick(Position); feedbackRL.Click += (s, e) => feedbackClick(Position); go_to_my_reviewsLL.Click += (s, e) => reviews_by_meClick(Position); aboutMeRL.Click += (s, e) => about_meClick(Position); view.Click += view_Click; onlyWithReviewsS.CheckedChange += async delegate { if (onlyWithReviewsS.Checked) { onlineValueTV.Text = context.GetString(Resource.String.online_text); onlineValueTV.SetTextColor(Color.Green); var res = await profileAndExpertMethods.EditMyOnline(userMethods.GetUsersAuthToken(), true); } else { onlineValueTV.SetTextColor(Color.Red); onlineValueTV.Text = context.GetString(Resource.String.offline_text); var res = await profileAndExpertMethods.EditMyOnline(userMethods.GetUsersAuthToken(), false); } }; }