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);
        }
示例#2
0
        private Score MapScores(Android.Database.ICursor cursor)
        {
            Score scr = new Score ();
            scr.ScoreID = cursor.GetInt (0);
            scr.ScoreDate = cursor.GetString (1);
            scr.PlayerName = cursor.GetString (2);
            scr.ScoreNumber = cursor.GetInt (3);

            return (scr);
        }
示例#3
0
 private Score MapScores(Android.Database.ICursor cursor)
 {
     Score scr = new Score();
     scr.ScoreID = cursor.GetInt(0);
     scr.ScoreDate = cursor.GetString(1);
     scr.ScoreNumber = cursor.GetInt(2);
     scr.Rating = cursor.GetDouble(3);
     scr.Slope = cursor.GetInt(4);
     return (scr);
 }
示例#4
0
 public override void OnActivityCreated(Android.OS.Bundle savedInstanceState)
 {
     base.OnActivityCreated(savedInstanceState);
     if (savedInstanceState != null && savedInstanceState.GetInt(RUN_ID, -1) != -1) {
         CurrentRun = mRunManager.GetRun(savedInstanceState.GetInt(RUN_ID));
     }
     else if (Activity.Intent.GetIntExtra(RUN_ID, -1) != -1) {
         CurrentRun = mRunManager.GetRun(Activity.Intent.GetIntExtra(RUN_ID, -1));
     }
     else if (CurrentRun == null) {
         Run run = mRunManager.GetActiveRun();
         if (run != null) {
             CurrentRun = run;
         }
     }
 }
 public override void OnCreate(Android.OS.Bundle savedInstanceState)
 {
     if (savedInstanceState != null) {
         var savedAvatarIndex = savedInstanceState.GetInt (KeySelectedAvatarIndex);
         selectedAvatar = (Avatar)savedAvatarIndex;
     }
     base.OnCreate (savedInstanceState);
 }
示例#6
0
        private Question NewQuestion(Android.Database.ICursor cursor)
        {
            Question qst = new Question ();
            qst.ImageID = cursor.GetInt (1);
            qst.QuestionString = cursor.GetString (2);
            qst.CorrectAnswer = cursor.GetString (3);
            qst.WrongAnswer1 = cursor.GetString (4);
            qst.WrongAnswer2 = cursor.GetString (5);
            qst.WrongAnswer3 = cursor.GetString (6);

            return (qst);
        }
		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)));
			}
		}
 protected override Java.Lang.Object OnGetDefaultValue(Android.Content.Res.TypedArray ta, int index)
 {
     var defaultValue = ta.GetInt (index, DEFAULT_VALUE);
     return defaultValue;
 }