protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.simple_titles);

            mAdapter = new TestFragmentAdapter(SupportFragmentManager);

            mPager         = FindViewById <ViewPager>(Resource.Id.pager);
            mPager.Adapter = mAdapter;

            TitlePageIndicator indicator = FindViewById <TitlePageIndicator>(Resource.Id.indicator);

            mIndicator = indicator;
            indicator.SetViewPager(mPager);

            float density = Resources.DisplayMetrics.Density;

            indicator.SetBackgroundColor(Color.ParseColor("#18FF0000"));
            indicator.FooterColor           = Color.ParseColor("#FFAA2222");
            indicator.FooterLineHeight      = 1 * density; //1dp
            indicator.FooterIndicatorHeight = 3 * density; //3dp
            indicator.FooterIndicatorStyle  = IndicatorStyle.Underline;
            indicator.TextColor             = Color.ParseColor("#AA000000");
            indicator.SelectedColor         = Color.ParseColor("#FF000000");
            indicator.SelectedBold          = true;
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.simple_titles);

            mAdapter = new TestFragmentAdapter(SupportFragmentManager);

            mPager         = FindViewById <ViewPager>(Resource.Id.pager);
            mPager.Adapter = mAdapter;

            TitlePageIndicator indicator = FindViewById <TitlePageIndicator>(Resource.Id.indicator);

            indicator.SetViewPager(mPager);
            indicator.FooterIndicatorStyle = IndicatorStyle.Triangle;
            mIndicator = indicator;
        }