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); }
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)); }
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); cur = getRootView(position); next = getRootView(position + 1); prev = getRootView(position - 1); return(curFragment); }