protected override void OnCreate (Bundle savedInstanceState) { base.OnCreate (savedInstanceState); SetContentView (Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter (SupportFragmentManager); mPager = FindViewById<ViewPager> (Resource.Id.pager); mPager.Adapter = mAdapter; var indicator = FindViewById<TitlePageIndicator> (Resource.Id.indicator); mIndicator = indicator; indicator.SetViewPager (mPager); float density = Resources.DisplayMetrics.Density; indicator.SetBackgroundColor (Color.ParseColor ("#18FF0000")); indicator.SetFooterColor (Color.ParseColor ("#FFAA2222")); indicator.SetFooterLineHeight (1 * density); //1dp indicator.SetFooterIndicatorHeight (3 * density); //3dp indicator.SetFooterIndicatorStyle (IndicatorStyle.Underline); indicator.SetTextColor (Color.ParseColor ("#AA000000")); indicator.SetSelectedColor (Color.ParseColor ("#FF000000")); indicator.SetSelectedBold (true); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter(SupportFragmentManager); mPager = FindViewById <ViewPager> (Resource.Id.pager); mPager.Adapter = mAdapter; var indicator = FindViewById <TitlePageIndicator> (Resource.Id.indicator); mIndicator = indicator; indicator.SetViewPager(mPager); float density = Resources.DisplayMetrics.Density; indicator.SetBackgroundColor(Color.ParseColor("#18FF0000")); indicator.SetFooterColor(Color.ParseColor("#FFAA2222")); indicator.SetFooterLineHeight(1 * density); //1dp indicator.SetFooterIndicatorHeight(3 * density); //3dp indicator.SetFooterIndicatorStyle(IndicatorStyle.Underline); indicator.SetTextColor(Color.ParseColor("#AA000000")); indicator.SetSelectedColor(Color.ParseColor("#FF000000")); indicator.SetSelectedBold(true); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter(SupportFragmentManager); mPager = FindViewById <ViewPager> (Resource.Id.pager); mPager.Adapter = mAdapter; mIndicator = FindViewById <TitlePageIndicator> (Resource.Id.indicator); mIndicator.SetViewPager(mPager); }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.themed_titles); mAdapter = new TestTitleFragmentAdapter (SupportFragmentManager); mPager = FindViewById<ViewPager> (Resource.Id.pager); mPager.Adapter = mAdapter; mIndicator = FindViewById<TitlePageIndicator> (Resource.Id.indicator); mIndicator.SetViewPager (mPager); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate (savedInstanceState); SetContentView(Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter(SupportFragmentManager); mPager = FindViewById<ViewPager>(Resource.Id.pager); mPager.Adapter = mAdapter; mIndicator = FindViewById<TitlePageIndicator>(Resource.Id.indicator); mIndicator.SetViewPager(mPager); mIndicator.SetOnPageChangeListener(new MyPageChangeListener(this)); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate (savedInstanceState); SetContentView(Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter(SupportFragmentManager); mPager = FindViewById<ViewPager>(Resource.Id.pager); mPager.Adapter = mAdapter; var indicator = FindViewById<TitlePageIndicator>(Resource.Id.indicator); indicator.SetViewPager(mPager); indicator.SetFooterIndicatorStyle(IndicatorStyle.Triangle); mIndicator = indicator; }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter (SupportFragmentManager); mPager = FindViewById<ViewPager> (Resource.Id.pager); mPager.Adapter = mAdapter; mIndicator = FindViewById<TitlePageIndicator> (Resource.Id.indicator); mIndicator.SetViewPager (mPager); mIndicator.SetCurrentItem (mAdapter.Count - 1); //You can also do: indicator.setViewPager(pager, initialPage); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter(SupportFragmentManager); mPager = FindViewById <ViewPager> (Resource.Id.pager); mPager.Adapter = mAdapter; mIndicator = FindViewById <TitlePageIndicator> (Resource.Id.indicator); mIndicator.SetViewPager(mPager); mIndicator.SetCurrentItem(mAdapter.Count - 1); //You can also do: indicator.setViewPager(pager, initialPage); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.simple_titles); mAdapter = new TestTitleFragmentAdapter(SupportFragmentManager); mPager = FindViewById <ViewPager> (Resource.Id.pager); mPager.Adapter = mAdapter; var indicator = FindViewById <TitlePageIndicator> (Resource.Id.indicator); indicator.SetViewPager(mPager); indicator.SetFooterIndicatorStyle(IndicatorStyle.Underline); indicator.SetOnCenterItemClickListener(this); mIndicator = indicator; }