public override void OnCreate (Android.OS.Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);
        
            if (savedInstanceState != null) {
                mRetryCounter = savedInstanceState.GetInt (KEY_RETRY_COUNTER);
                mRetryLoadFullWalletCount = savedInstanceState.GetInt (KEY_RETRY_FULL_WALLET_COUNTER);
                mHandleFullWalletWhenReady =
                    savedInstanceState.GetBoolean (KEY_HANDLE_FULL_WALLET_WHEN_READY);
            }
            mActivityLaunchIntent = Activity.Intent;
            mItemId = mActivityLaunchIntent.GetIntExtra (Constants.EXTRA_ITEM_ID, 0);
            mMaskedWallet = mActivityLaunchIntent.GetParcelableExtra (Constants.EXTRA_MASKED_WALLET).JavaCast<MaskedWallet> ();

            var accountName = ((BikestoreApplication) Activity.Application).AccountName;

            // Set up an API client;
            mGoogleApiClient = new GoogleApiClient.Builder (Activity)
                .AddConnectionCallbacks (this)
                .AddOnConnectionFailedListener (this)
                .SetAccountName (accountName)
                .AddApi (WalletClass.API, new WalletClass.WalletOptions.Builder ()
                    .SetEnvironment (Constants.WALLET_ENVIRONMENT)
                    .SetTheme (WalletConstants.ThemeLight)
                    .Build ())
                .Build ();

            mRetryHandler = new RetryHandler (this);
        }
		public override void OnCreate(Android.OS.Bundle savedInstanceState)
		{
			base.OnCreate(savedInstanceState);
			Android.Util.Log.Info("SuperAwesomeCardFragment", string.Format("OnCreate called"));
			if (savedInstanceState != null)
			{
				_position = savedInstanceState.GetInt("position", 0);
				_enableProgressButton = savedInstanceState.GetBoolean("enableProgressButton", false);
			}
			if (this.View != null)
			{
				Android.Util.Log.Info("SuperAwesomeCardFragment", string.Format(string.Format("View already present for position {0}", _position)));
			}
		}
 public override void OnCreate (Android.OS.Bundle savedInstanceState)
 {
     base.OnCreate (savedInstanceState);
     if (savedInstanceState != null)
         mPromoWasSelected = savedInstanceState.GetBoolean (KEY_PROMO_CLICKED);
     
     var accountName = ((BikestoreApplication) Activity.Application).AccountName;
     var options = new Android.Gms.Identity.Intents.Address.AddressOptions (WalletConstants.ThemeLight);
     mGoogleApiClient = new GoogleApiClient.Builder (Activity)
         .AddApi (Android.Gms.Identity.Intents.Address.Api, options)
         .SetAccountName (accountName)
         .AddConnectionCallbacks (this)
         .AddOnConnectionFailedListener (this)
         .Build();
 }
Esempio n. 4
0
        public override void OnCreate (Android.OS.Bundle savedInstanceState)
        {
            base.OnCreate (savedInstanceState);

            if (savedInstanceState != null)
                mSignInButtonClicked = savedInstanceState.GetBoolean (KEY_SIGNIN_BUTTON_CLICKED);
            
            var args = Arguments;
            if (args != null)
                mLoginAction = args.GetInt (LoginActivity.EXTRA_ACTION);
            
            var options = new PlusClass.PlusOptions.Builder ().Build ();
            mGoogleApiClient = new GoogleApiClient.Builder (Activity)
                .AddApi (PlusClass.API, options)
                .AddConnectionCallbacks (this)
                .AddOnConnectionFailedListener(this)
                .AddScope (PlusClass.ScopePlusProfile)
                .AddScope (new Scope (WALLET_SCOPE))
                .Build ();
        }