Exemplo n.º 1
0
        public static Android.Support.V4.App.Fragment newInstance(MainActivity context, int pos, float scale, bool IsBlured)
        {
            Bundle b = new Bundle();

            b.PutInt("pos", pos);
            b.PutFloat("scale", scale);
            b.PutBoolean("IsBlured", IsBlured);
            MyFragment myf = new MyFragment();

            return(Android.Support.V4.App.Fragment.Instantiate(context, myf.Class.Name, b));
        }
Exemplo n.º 2
0
        public override Android.Support.V4.App.Fragment GetItem(int position)
        {
            if (position == MainActivity.FIRST_PAGE)
            {
                scale = MainActivity.BIG_SCALE;
            }
            else
            {
                scale    = MainActivity.SMALL_SCALE;
                IsBlured = true;
            }

            Console.WriteLine("position =========== " + position.ToString());
            Android.Support.V4.App.Fragment curFragment = MyFragment.newInstance(context, position, scale, IsBlured);

            return(curFragment);
        }
Exemplo n.º 3
0
        void ViewPager.IOnPageChangeListener.OnPageSelected(int position)
        {
            MyFragment.GetPosition(position);
            ImageView monImg = new ImageView(this.context);

            monImg.FindViewById <ImageView>(Resource.Id.content);



            //if(position>1)
            //{
            //    var p = prev.LayoutParameters;
            //    p.Width = 500;
            //    prev.LayoutParameters = p;
            //}

            //var q = cur.LayoutParameters;
            //var r = next.LayoutParameters;


            //q.Width = 700;
            //r.Width = 500;

            //cur.LayoutParameters = q;
            //next.LayoutParameters = r;

            //int y = next.Width;

            if (lastPage <= position)
            {
                swipedLeft = true;
            }
            else if (lastPage > position)
            {
                swipedLeft = false;
            }

            lastPage = position;
        }