void tmp_init()
        {
            for (int i = 0; i < _numberofElements; i++)
            {
                GTVerticalScrollView vscroll = new GTVerticalScrollView(new CGRect(_width * i, 0, _width, _height));
                vscroll.Index = i;
                if (i % 2 == 0)
                {
                    vscroll.MainImage = UIImage.FromFile("MLResources/backbt.png");
                }
                else
                {
                    vscroll.MainImage = UIImage.FromFile("MLResources/fondo1.png");
                }
                VerticalContainer vc = new VerticalContainer();
                //VerticalIndexContainer vc = new VerticalIndexContainer();
                vscroll.SetContent(vc, vc.getHeight());
                _scroll.Add(vscroll);
                _scroll.ContentSize = new CGSize((i + 1) * _width, _height);

                //if (i > 0)
                ///	vscroll.SetHorizontalOffset (_width/2);
                vscroll.GTVerticalScrollSelected += (s, id) => {
                };
                vscroll.GTVerticalScrollReleased += (s, id) => {};
                vscroll.GTVerticalScrollTapped   += (s, id) => {};

                _scrollList.Add(vscroll);
            }
        }
        public void AddVerticalContainer(VerticalContainer vc, int idx)        //,  UIImage cover)
        {
            GTVerticalScrollView vscroll = new GTVerticalScrollView(new CGRect(_width * idx, 0, _width, _height));

            vscroll.Index     = idx;
            vscroll.MainImage = UIImage.FromFile("MLResources/default_img.png");
            //set content
            vscroll.SetContent(vc, vc.getHeight());
            _scroll.Add(vscroll);
            _scroll.ContentSize = new CGSize((idx + 1) * _width, _height);

            ScrollList.Add(vscroll);
            _numberofElements = ScrollList.Count;
        }
예제 #3
0
        public void AddVerticalContainer(VerticalContainer vc, int idx)
        {
            GTVerticalScrollView vscroll = new GTVerticalScrollView(new CGRect(_width * idx, 0, _width, _height));

            vscroll.Index = idx;
            if (idx % 2 == 0)
            {
                vscroll.MainImage = UIImage.FromFile("assets/imgtest.jpg");
            }
            else
            {
                vscroll.MainImage = UIImage.FromFile("assets/luna.jpg");
            }
            //set content
            vscroll.SetContent(vc, vc.getHeight());
            _scroll.Add(vscroll);
            _scroll.ContentSize = new CGSize((idx + 1) * _width, _height);

            ScrollList.Add(vscroll);
        }