Ejemplo n.º 1
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			adapter = new MyPagerAdapter (this, SupportFragmentManager);
			pager = FindViewById<ViewPager> (Resource.Id.pager);
			tabs = FindViewById<PagerSlidingTabStrip> (Resource.Id.tabs);
			pager.Adapter = adapter;
			tabs.SetViewPager (pager);
			tabs.OnPageChangeListener = this;
			var pageMargin = (int)TypedValue.ApplyDimension (ComplexUnitType.Dip, 4, Resources.DisplayMetrics);
			pager.PageMargin = pageMargin;
			pager.OffscreenPageLimit = 4;
			if (Settings.FirstRun) {
				pager.CurrentItem = 2;
				App.MessageDialog.SendMessage (Resources.GetString(Resource.String.get_started_welcome), Resources.GetString(Resource.String.welcome_to_kinderchat));
			} else {
				pager.CurrentItem = 0;
			}

			SupportActionBar.SetDisplayHomeAsUpEnabled (false);
			SupportActionBar.SetHomeButtonEnabled (false);

		
			// Register for GCM
			KinderGcmService.Register (this);
		}
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            adapter = new MyPagerAdapter(SupportFragmentManager);
            pager = FindViewById<ViewPager> (Resource.Id.pager);
            tabs = FindViewById<PagerSlidingTabStrip> (Resource.Id.tabs);
            pager.Adapter = adapter;
            tabs.Visibility = ViewStates.Invisible;
            tabs.SetViewPager (pager);

            var pageMargin = (int)TypedValue.ApplyDimension (ComplexUnitType.Dip, 4, Resources.DisplayMetrics);
            pager.PageMargin = pageMargin;
            tabs.OnPageChangeListener = this;

            PageIndicator mIndicator = FindViewById<CirclePageIndicator> (Resource.Id.indicator);
            mIndicator.SetViewPager (pager);

            mIndicator.SetOnPageChangeListener (new MyPageChangeListener (this));

            //			timer.Elapsed+=timer_Elapsed;
            //			timer.Start();

            SupportActionBar.SetDisplayHomeAsUpEnabled(false);
            SupportActionBar.SetHomeButtonEnabled(false);
        }
Ejemplo n.º 3
0
		protected override void OnCreate (Bundle bundle)
		{
            base.OnCreate(bundle);
            adapter = new MyPagerAdapter(this, SupportFragmentManager);
            pager = FindViewById<ViewPager>(Resource.Id.pager);
            tabs = FindViewById<PagerSlidingTabStrip>(Resource.Id.tabs);
			tabs.SetBackgroundResource (Settings.AppTheme == AppTheme.Red ? Resource.Drawable.red_gradient : Resource.Drawable.blue_gradient);
            pager.Adapter = adapter;
            tabs.SetViewPager(pager);
            tabs.OnPageChangeListener = this;
            var pageMargin = (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 4, Resources.DisplayMetrics);
            pager.PageMargin = pageMargin;
            pager.OffscreenPageLimit = 4;
            if (Settings.FirstRun)
            {
                pager.CurrentItem = 2;
                App.MessageDialog.SendMessage(Resources.GetString(Resource.String.get_started_welcome),
                    Resources.GetString(Resource.String.welcome_to_kinderchat));
            }
            else
            {
                pager.CurrentItem = 0;
            }

            //IntentFilter connectivityIntentFilter = new IntentFilter();
            //connectivityIntentFilter.AddAction(Android.Net.ConnectivityManager.ConnectivityAction);
            //RegisterReceiver(new NetworkChangeReceiver(), connectivityIntentFilter);

            // Register for GCM
            KinderGcmService.Register(this);

			App.ConnectionManager.TryKeepConnectionAsync ();
        }
Ejemplo n.º 4
0
        protected async override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetDisplayShowHomeEnabled(true);

            adapter = new MyPagerAdapter(FragmentManager, this.LayoutInflater, false);
            pager = FindViewById<ViewPager>(Resource.Id.pager);
            tabs = FindViewById<PagerSlidingTabStrip>(Resource.Id.tabs);
            pager.Adapter = adapter;
            tabs.SetViewPager(pager);
        }
Ejemplo n.º 5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            adapter = new MyPagerAdapter(SupportFragmentManager);
            pager = FindViewById<ViewPager> (Resource.Id.pager);
            tabs = FindViewById<PagerSlidingTabStrip> (Resource.Id.tabs);
            pager.Adapter = adapter;
            tabs.SetViewPager (pager);

            var pageMargin = (int)TypedValue.ApplyDimension (ComplexUnitType.Dip, 4, Resources.DisplayMetrics);
            pager.PageMargin = pageMargin;
            tabs.OnTabReselectedListener = this;

            ChangeColor (Resources.GetColor (Resource.Color.green));
        }
Ejemplo n.º 6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            adapter = new MyPagerAdapter (SupportFragmentManager);
            pager = FindViewById<ViewPager> (Resource.Id.pager);
            tabs = FindViewById<PagerSlidingTabStrip> (Resource.Id.tabs);
            pager.Adapter = adapter;
            tabs.SetViewPager (pager);

            pager.CurrentItem = 0;
            //tabs.OnTabReselectedListener = this;
            tabs.OnPageChangeListener = this;

            SupportActionBar.SetDisplayHomeAsUpEnabled (true);
            SupportActionBar.SetHomeButtonEnabled (true);
        }
    protected async override void OnCreate(Bundle bundle)
    {
      base.OnCreate(bundle);

      AuthenticationHelper.PlatformParameters = new PlatformParameters(this);
     

      adapter = new TabAdapter(this, SupportFragmentManager);
      pager = FindViewById<ViewPager>(Resource.Id.pager);
      tabs = FindViewById<PagerSlidingTabStrip>(Resource.Id.tabs);
      pager.Adapter = adapter;
      tabs.SetViewPager(pager);
      pager.OffscreenPageLimit = 2;


      SupportActionBar.SetDisplayHomeAsUpEnabled(false);
      SupportActionBar.SetHomeButtonEnabled(false);


    }
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            adapter = new MyIconPagerAdapter(SupportFragmentManager);
            pager = FindViewById<ViewPager>(Resource.Id.pager);
            tabs = FindViewById<PagerSlidingTabStrip>(Resource.Id.tabs);
            pager.Adapter = adapter;
            tabs.SetViewPager(pager);

            var pageMargin = (int) TypedValue.ApplyDimension(ComplexUnitType.Dip, 4, Resources.DisplayMetrics);
            pager.PageMargin = pageMargin;
            pager.CurrentItem = 1;
            tabs.OnTabReselectedListener = this;
            tabs.OnPageChangeListener = this;

            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);

            ChangeColor(Resources.GetColor(Resource.Color.green));
        }