protected internal override void onCreate(Bundle savedInstanceState)
        {
            base.onCreate(savedInstanceState);
            ContentView = R.layout.activity_main;

            // Set up the action bar.
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final android.support.v7.app.ActionBar actionBar = getSupportActionBar();
            ActionBar actionBar = SupportActionBar;

            actionBar.NavigationMode = ActionBar.NAVIGATION_MODE_TABS;

            SectionsPagerAdapter pageAdapter = new SectionsPagerAdapter(this, SupportFragmentManager);

            viewPager         = (ViewPager)findViewById(R.id.pager);
            viewPager.Adapter = pageAdapter;

            viewPager.OnPageChangeListener = new SimpleOnPageChangeListenerAnonymousInnerClassHelper(this, actionBar);

            for (int i = 0; i < pageAdapter.Count; i++)
            {
                SupportActionBar.addTab(SupportActionBar.newTab().setText(pageAdapter.getPageTitle(i)).setTabListener(this));
            }
        }
 public SimpleOnPageChangeListenerAnonymousInnerClassHelper(ThreadExampleActivity outerInstance, ActionBar actionBar)
 {
     this.outerInstance = outerInstance;
     this.actionBar     = actionBar;
 }
		public override void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction)
		{
			viewPager.CurrentItem = tab.Position;
		}
		public override void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction)
		{

		}
			public SimpleOnPageChangeListenerAnonymousInnerClassHelper(ThreadExampleActivity outerInstance, ActionBar actionBar)
			{
				this.outerInstance = outerInstance;
				this.actionBar = actionBar;
			}