private ImageViewPlus iv_roundRect;//圆角矩形图片 protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Create your application here SetContentView(Resource.Layout.main_content_item); iv_roundRect = FindViewById <ImageViewPlus>(Resource.Id.roundRect); iv_roundRect.SetType(ImageViewPlus.TYPE_ROUND); iv_roundRect.SetRoundRadius(120); }
public MainItemAdapterViewHolder(View itemView, Action <MainItemAdapterClickEventArgs> clickListener, Action <MainItemAdapterClickEventArgs> longClickListener) : base(itemView) { _v_title = (TextView)itemView.FindViewById(Resource.Id.v_title); _v_time = itemView.FindViewById <TextView>(Resource.Id.v_time); _v_comment = itemView.FindViewById <TextView>(Resource.Id.v_commont); _v_collect = itemView.FindViewById <TextView>(Resource.Id.v_collect); imagePlus = itemView.FindViewById <ImageViewPlus>(Resource.Id.roundRect); imagePlus.SetType(ImageViewPlus.TYPE_ROUND); imagePlus.SetRoundRadius(120); itemView.Click += (sender, e) => clickListener(new MainItemAdapterClickEventArgs { View = itemView, Position = AdapterPosition }); itemView.LongClick += (sender, e) => longClickListener(new MainItemAdapterClickEventArgs { View = itemView, Position = AdapterPosition }); }