public override View OnCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			Dialog.SetTitle (GetString (Resource.String.sign_in));
			var v = inflater.Inflate (Resource.Layout.fingerprint_dialog_container, container, false);
			mCancelButton = (Button)v.FindViewById (Resource.Id.cancel_button);
			mCancelButton.Click += (object sender, EventArgs e) => Dismiss ();

			mSecondDialogButton = (Button)v.FindViewById (Resource.Id.second_dialog_button);
			mSecondDialogButton.Click += (object sender, EventArgs e) => {
				if (mStage == Stage.Fingerprint) {
					GoToBackup ();
				} else {
					VerifyPassword ();
				}
			};

			mFingerprintContent = v.FindViewById (Resource.Id.fingerprint_container);
			mBackupContent = v.FindViewById (Resource.Id.backup_container);
			mPassword = v.FindViewById<EditText> (Resource.Id.password);
			mPassword.SetOnEditorActionListener (this);
			mPasswordDescriptionTextView = v.FindViewById<TextView> (Resource.Id.password_description);
			mUseFingerprintFutureCheckBox = v.FindViewById<CheckBox> (Resource.Id.use_fingerprint_in_future_check);
			mNewFingerprintEnrolledTextView = v.FindViewById<TextView> (Resource.Id.new_fingerprint_enrolled_description);
			mFingerprintUiHelper = mFingerprintUiHelperBuilder.Build (
				(ImageView)v.FindViewById (Resource.Id.fingerprint_icon),
				(TextView)v.FindViewById (Resource.Id.fingerprint_status), this);
			UpdateStage ();

			// If fingerprint authentication is not available, switch immediately to the backup
			// (password) screen.
			if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
				GoToBackup ();

			return v;
		}
コード例 #2
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Dialog.SetTitle(GetString(Resource.String.sign_in));
            var v = inflater.Inflate(Resource.Layout.fingerprint_dialog_container, container, false);

            mCancelButton        = (Button)v.FindViewById(Resource.Id.cancel_button);
            mCancelButton.Click += (object sender, EventArgs e) => Dismiss();

            mSecondDialogButton        = (Button)v.FindViewById(Resource.Id.second_dialog_button);
            mSecondDialogButton.Click += (object sender, EventArgs e) => {
                if (mStage == Stage.Fingerprint)
                {
                    GoToBackup();
                }
                else
                {
                    VerifyPassword();
                }
            };

            mInputMethodManager = (InputMethodManager)Context.GetSystemService(Context.InputMethodService);
            mFingerprintContent = v.FindViewById(Resource.Id.fingerprint_container);
            mBackupContent      = v.FindViewById(Resource.Id.backup_container);
            mPassword           = v.FindViewById <EditText> (Resource.Id.password);
            mPassword.SetOnEditorActionListener(this);
            mPasswordDescriptionTextView    = v.FindViewById <TextView> (Resource.Id.password_description);
            mUseFingerprintFutureCheckBox   = v.FindViewById <CheckBox> (Resource.Id.use_fingerprint_in_future_check);
            mNewFingerprintEnrolledTextView = v.FindViewById <TextView> (Resource.Id.new_fingerprint_enrolled_description);
            var fingerprintManager = (FingerprintManager)Context.GetSystemService(Context.FingerprintService);

            mFingerprintUiHelperBuilder = new FingerprintUiHelper.FingerprintUiHelperBuilder(fingerprintManager);
            mFingerprintUiHelper        = mFingerprintUiHelperBuilder.Build(
                (ImageView)v.FindViewById(Resource.Id.fingerprint_icon),
                (TextView)v.FindViewById(Resource.Id.fingerprint_status), this);
            UpdateStage();

            // If fingerprint authentication is not available, switch immediately to the backup
            // (password) screen.
            if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
            {
                GoToBackup();
            }

            return(v);
        }
コード例 #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            Dialog.SetTitle(GetString(Resource.String.sign_in));
            var v = inflater.Inflate(Resource.Layout.fingerprint_dialog_container, container, false);

            mCancelButton        = (Button)v.FindViewById(Resource.Id.cancel_button);
            mCancelButton.Click += (object sender, EventArgs e) => Dismiss();

            mSecondDialogButton        = (Button)v.FindViewById(Resource.Id.second_dialog_button);
            mSecondDialogButton.Click += (object sender, EventArgs e) => {
                if (mStage == Stage.Fingerprint)
                {
                    GoToBackup();
                }
                else
                {
                    VerifyPassword();
                }
            };

            mFingerprintContent = v.FindViewById(Resource.Id.fingerprint_container);
            mBackupContent      = v.FindViewById(Resource.Id.backup_container);
            mPassword           = (EditText)v.FindViewById(Resource.Id.password);
            mPassword.SetOnEditorActionListener(this);
            mFingerprintUiHelper = mFingerprintUiHelperBuilder.Build(
                (ImageView)v.FindViewById(Resource.Id.fingerprint_icon),
                (TextView)v.FindViewById(Resource.Id.fingerprint_status), this);
            UpdateStage();

            // If fingerprint authentication is not available, switch immediately to the backup
            // (password) screen.
            if (!mFingerprintUiHelper.IsFingerprintAuthAvailable)
            {
                GoToBackup();
            }

            return(v);
        }