private void Initialize(View view, ExpandCollapseAnimationType type)
            {
                _animationView = view;
                _type = type;

                _endHeight = view.MeasuredHeight;
                _layoutParams = ((LinearLayout.LayoutParams)view.LayoutParameters);

                if (_type == ExpandCollapseAnimationType.Expand)
                {
                    _layoutParams.BottomMargin = -_endHeight;
                }
                else
                {
                    _layoutParams.BottomMargin = 0;
                }
                view.Visibility = ViewStates.Visible;
            }
 public ExpandCollapseAnimation(View view, ExpandCollapseAnimationType type)
     : base()
 {
     Initialize(view, type);
 }