示例#1
0
        public static DetailFragment CreateInstance(string attractionName)
        {
            DetailFragment detailFragment = new DetailFragment();
            Bundle         bundle         = new Bundle();

            bundle.PutString(ExtraAttraction, attractionName);
            detailFragment.Arguments = bundle;
            return(detailFragment);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_main);

            var attraction = Intent.GetStringExtra(EXTRA_ATTRACTION);

            if (savedInstanceState == null)
            {
                SupportFragmentManager.BeginTransaction()
                .Add(Resource.Id.container, DetailFragment.CreateInstance(attraction))
                .Commit();
            }

            fingerprintModule = new FingerprintModule(this);
            mKeyguardManager  = fingerprintModule.ProvidesKeyguardManager(this);
            mKeyStore         = fingerprintModule.ProvidesKeystore();
            mKeyGenerator     = fingerprintModule.ProvidesKeyGenerator();
            mCipher           = fingerprintModule.ProvidesCipher(mKeyStore);

            RequestPermissions(new[] { Manifest.Permission.UseFingerprint }, FINGERPRINT_PERMISSION_REQUEST_CODE);
        }