Exemple #1
0
        private void measureScrapChild(RecyclerView.Recycler recycler, int position, int widthSpec,
                                       int heightSpec, int[] measuredDimension)
        {
            View view = recycler.GetViewForPosition(position);

            if (view != null)
            {
                RecyclerView.LayoutParams p = (RecyclerView.LayoutParams)view.LayoutParameters;
                int childWidthSpec          = ViewGroup.GetChildMeasureSpec(widthSpec,
                                                                            PaddingLeft + PaddingRight, p.Width);
                int childHeightSpec = ViewGroup.GetChildMeasureSpec(heightSpec,
                                                                    PaddingTop + PaddingBottom, p.Height);
                view.Measure(childWidthSpec, childHeightSpec);
                measuredDimension[0] = view.MeasuredWidth + p.LeftMargin + p.RightMargin;
                measuredDimension[1] = view.MeasuredHeight + p.BottomMargin + p.TopMargin;
                recycler.RecycleView(view);
            }
        }
 private void RecycleView(RecyclerView.Recycler recycler, UnoViewHolder holder)
 {
     Layout.RemoveDetachedView(holder.ItemView);
     recycler.RecycleView(holder.ItemView);
 }