コード例 #1
0
        private void View_Click(object sender, EventArgs e)
        {
            gradesViewHolder GradesViewHolderCurrent = (gradesViewHolder)(sender as View).Tag;

            if (expandedPosition >= 0)
            {
                int prev = expandedPosition;
                System.Diagnostics.Debug.Write("ITEM COUNT: " + ItemCount);
                System.Diagnostics.Debug.Write("PREV: " + prev + "VH.POSITION: " + GradesViewHolderCurrent.AdapterPosition);
                NotifyItemChanged(prev);
            }
            expandedPosition = GradesViewHolderCurrent.AdapterPosition;
            System.Diagnostics.Debug.Write("NOTIFY(EXPANDED_POSTION): " + expandedPosition);
            NotifyItemChanged(expandedPosition);
        }
コード例 #2
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View view =
                LayoutInflater.From(parent.Context).Inflate(Resource.Layout.GradesCardLayout, parent, false);

            GradesViewHolder = new gradesViewHolder(view);

            /* Show Grades Button Click Event */
            GradesViewHolder.ShowGradesButton.Click += View_Click;
            GradesViewHolder.ShowGradesButton.Tag    = GradesViewHolder;

            /*Teacher Info Button Click Event */
            GradesViewHolder.TeacherInfoButton.Click += PopUpBox;

            return(GradesViewHolder);
        }