예제 #1
0
 public RecyclerViewHolder(View view, RecyclerViewAdapter parent) : base(view)
 {
     TextView  = view.FindViewById <TextView>(Resource.Id.info_text);
     ImageView = view.FindViewById <ImageView>(Resource.Id.info_image);
     view.SetOnClickListener(this);
     this.parent = parent;
 }
예제 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.activity_main);

            RecyclerView recyclerView    = FindViewById <RecyclerView>(Resource.Id.rvNumbers);
            int          numberOfColumns = 3;

            recyclerView.SetLayoutManager(new GridLayoutManager(this, numberOfColumns));
            adapter = new RecyclerViewAdapter(this, new Business.Loader().LoadData());
            adapter.SetClickListener(this);
            recyclerView.SetAdapter(adapter);
        }