Пример #1
0
        void UpdateOrientation()
        {
            if (_view.Orientation == ScrollOrientation.Horizontal || _view.Orientation == ScrollOrientation.Both)
            {
                if (_hScrollView == null)
                {
                    _hScrollView = new AHorizontalScrollView(Context, this);
                }

                ((AHorizontalScrollView)_hScrollView).IsBidirectional = _isBidirectional = _view.Orientation == ScrollOrientation.Both;

                if (_hScrollView.Parent != this)
                {
                    _container.RemoveFromParent();
                    _hScrollView.AddView(_container);
                    AddView(_hScrollView);
                }
            }
            else
            {
                if (_container.Parent != this)
                {
                    _container.RemoveFromParent();
                    if (_hScrollView != null)
                    {
                        _hScrollView.RemoveFromParent();
                    }
                    AddView(_container);
                }
            }
        }