/// <summary> /// Updating textviews and reinitializing authentication mechanism /// </summary> protected override void OnStart() { base.OnStart(); SecurityProvider.FingerprintAuthenticate(this); _progressBar.Visibility = ViewStates.Invisible; FindViewById <TextView>(Resource.Id.fingerprintScanHint).Text = Resources.GetString(Resource.String.FingerprintScanHint); FindViewById <TextView>(Resource.Id.passwordUsageHint).Text = Resources.GetString(Resource.String.PasswordUsageHint); FindViewById <Button>(Resource.Id.ButtonSubmitAuthorization).Text = Resources.GetString(Resource.String.LoginButton); }
/// <summary> /// Activity creation event /// </summary> /// <param name="bundle"></param> protected override void OnCreate(Bundle bundle) { Window.RequestFeature(Android.Views.WindowFeatures.ActivityTransitions); Window.RequestFeature(Android.Views.WindowFeatures.ContentTransitions); base.OnCreate(bundle); SetContentView(Resource.Layout.LoginPage); FindViewById <TextView>(Resource.Id.loginPageTitle).Typeface = Typeface.CreateFromAsset(Assets, "fonts/BROADW.ttf"); FindViewById <TextView>(Resource.Id.fingerprintScanHint).Typeface = Typeface.CreateFromAsset(Assets, "fonts/MINIONPRO-REGULAR.OTF"); FindViewById <TextView>(Resource.Id.passwordUsageHint).Typeface = Typeface.CreateFromAsset(Assets, "fonts/MINIONPRO-REGULAR.OTF"); FindViewById <Button>(Resource.Id.ButtonSubmitAuthorization).Typeface = Typeface.CreateFromAsset(Assets, "fonts/MINIONPRO-REGULAR.OTF"); FindViewById <Button>(Resource.Id.ButtonSubmitAuthorization).Click += (object sender, EventArgs e) => PasswordAuthorization(); _progressBar = FindViewById <RelativeLayout>(Resource.Id.progressBar); SecurityProvider.FingerprintAuthenticate(this); }
/// <summary> /// Fingerprint authorization failed event handler /// </summary> public void OnAuthenticationFailed() { Toast.MakeText(this, this.Resources.GetString(Resource.String.FingerprintScanFailedError), ToastLength.Long).Show(); SecurityProvider.FingerprintAuthenticate(this); }