public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (container == null) { return(null); } LinearLayout l = (LinearLayout)inflater.Inflate(Resource.Layout.mf, container, false); int pos = this.Arguments.GetInt("pos"); TextView tv = (TextView)l.FindViewById(Resource.Id.viewID); tv.Text = "Position = " + pos; LinearLayout root = (LinearLayout)l.FindViewById(Resource.Id.root); float scale = this.Arguments.GetFloat("scale"); bool isBlured = this.Arguments.GetBoolean("IsBlured"); if (isBlured) { ViewHelper.SetAlpha(root, MyPagerAdapter.getMinAlpha()); ViewHelper.SetRotationY(root, MyPagerAdapter.getMinDegree()); } return(l); }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.Main); pager = FindViewById<ViewPager>(Resource.Id.myviewpager); adapter = new MyPagerAdapter(this, this.SupportFragmentManager); pager.Adapter = adapter; pager.SetOnPageChangeListener (adapter); pager.SetCurrentItem (FIRST_PAGE,true); pager.OffscreenPageLimit = 3; pager.PageMargin = Convert.ToInt32 (GetString(Resource.String.pagermargin)); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); pager = FindViewById <ViewPager>(Resource.Id.myviewpager); adapter = new MyPagerAdapter(this, this.SupportFragmentManager); pager.Adapter = adapter; pager.SetOnPageChangeListener(adapter); pager.SetCurrentItem(FIRST_PAGE, true); pager.OffscreenPageLimit = 3; pager.PageMargin = Convert.ToInt32(GetString(Resource.String.pagermargin)); }