Esempio n. 1
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            VokabelKastenViewHolder vh = holder as VokabelKastenViewHolder;

            //Load Text into Specific Cards
            vh.title.Text = list[position].name;
        }
Esempio n. 2
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            // Inflate the CardView for the Elements:
            View itemView = LayoutInflater.From(parent.Context).
                            Inflate(Resource.Layout.VokabelKastenCard, parent, false);

            // Create a ViewHolder to hold view references inside the CardView:
            VokabelKastenViewHolder vh = new VokabelKastenViewHolder(itemView);

            //Handle Creation of Cards
            vh.edit.Click += delegate
            {
                Control.setSelectedVocabBox(vh.AdapterPosition);

                //ToDo: Do Stuff Here
                Toast.MakeText(context, "Edit was Clicked", ToastLength.Short);
                context.StartActivity(typeof(EditVokabelKasten));
            };

            vh.learn.Click += delegate
            {
                Control.setSelectedVocabBox(vh.AdapterPosition);
                context.StartActivity(typeof(Learn));

                //ToDo: Do Stuff Here
                Toast.MakeText(context, "Learn was Clicked", ToastLength.Short);
            };

            //Return View Holder
            return(vh);
        }