B
B
Bogdan2019-09-23 16:45:57
Android
Bogdan, 2019-09-23 16:45:57

Fingerprint window stylization (biometrics)?

Gentlemen, but do not tell me how to style the fingerprint input window. Couldn't google anything.
I use the androidx.biometric 1.0.0-beta02 library

import androidx.biometric.BiometricPrompt;

....

final BiometricPrompt biometricPrompt = new BiometricPrompt(this, Executors.newSingleThreadExecutor(), new BiometricPrompt.AuthenticationCallback() {
            @Override
            public void onAuthenticationError(int errorCode, @NonNull CharSequence errString) {
                super.onAuthenticationError(errorCode, errString);
                if (errorCode == BiometricPrompt.ERROR_NEGATIVE_BUTTON) {
                    // user clicked negative button
                    textView1.setText("Cancel");
                } else {
                    textView1.setText("Error  " + errorCode);
                    
                }
            }

            @Override
            public void onAuthenticationSucceeded(@NonNull BiometricPrompt.AuthenticationResult result) {
                super.onAuthenticationSucceeded(result);
                textView1.setText("Success");
            }

            @Override
            public void onAuthenticationFailed() {
                super.onAuthenticationFailed();
                textView1.setText("Fail");
            }
        });

        
        final BiometricPrompt.PromptInfo promptInfo = new BiometricPrompt.PromptInfo.Builder()
                .setTitle("Подтвердите свою личность")
                .setDescription("Используя отпечатки пальцев для проверки личности")
                .setNegativeButtonText("Отмена")
                .build();


        findViewById(R.id.button).setOnClickListener(
                new View.OnClickListener() {
                    public void onClick(View v) {
                        biometricPrompt.authenticate(promptInfo);

                    }
                }
        );

I'm testing on a Nexus emulator with Android 9 (Api 28), it's normally displayed
5d88cb2b9e560224760164.png
. I'm testing on a Samsung S10 with Android 9. It is somehow crookedly displayed. The fingerprint is at the very bottom and did not fall into the white frame.
5d88cbe942fd2032827680.jpeg
Is there any way to style the app? For example, in some applications they were somehow able to style it, do not tell me how?
5d88cc665d24e392163187.jpeg
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question