コード例 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.account);

            myAdapter     = new MyAdapter(SupportFragmentManager);
            pager         = FindViewById <ViewPager>(Resource.Id.pager);
            tabStrip      = FindViewById <PagerSlidingTabStrip>(Resource.Id.tabs);
            pager.Adapter = myAdapter;
            tabStrip.SetViewPager(pager);
            tabStrip.ShouldExpand = true;
            tabStrip.SetTabTextColor(Resource.Color.lightGray);
            tabStrip.TabTextColorSelected = GetColorStateList(Resource.Color.white);
            tabStrip.SetFitsSystemWindows(true);

            tabStrip.TabPaddingLeftRight = 240;
            tabStrip.SetBackgroundColor(Android.Graphics.Color.ParseColor("#075E54"));
            // Create your application here
        }