Biometrics Prompt width issue Samsung S8

156 views Asked by At

I have implemented BiometricsPrompt in one of my apps and have found that the dialog is not displayed properly just for Samsung S8. I have tested Samsung S10, Pixel 4, Nokia 6 and Android emulator with different resolutions so I believe the issue could be in Samsung custom UI layer.

I am using androidx.biometric:biometric:1.0.1 and the layout of the Activity is the following:

<?xml version="1.0" encoding="utf-8"?>

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:focusableInTouchMode="true"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:contentDescription="@null"
                android:layout_marginTop="0dp"
                android:paddingTop="0dp"
                android:adjustViewBounds="true"
                android:scaleType="fitEnd"
                app:srcCompat="@drawable/registration_welcome_background_2_motor"/>

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:contentDescription="@null"
                android:src="@drawable/shared_transparent_gradient"/>
        </FrameLayout>

        <ImageView
            android:id="@+id/welcome_logo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"
            android:layout_gravity="center_horizontal"
            android:layout_marginBottom="@dimen/welcome_logo_vertical_margins"
            android:layout_marginTop="@dimen/welcome_logo_vertical_margins"
            app:srcCompat="@drawable/shared_application_load_logo_vector"
            tools:ignore="ContentDescription" />

        <Button
            android:id="@+id/btnSignIn"
            style="@style/shared_button_primary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/welcome_logo"
            android:layout_marginBottom="@dimen/shared_view_margin_double"
            android:layout_marginLeft="@dimen/shared_activity_horizontal_margin"
            android:layout_marginRight="@dimen/shared_activity_horizontal_margin"
            android:text="@string/registration_sign_in_biometrics_sign_in_button_text"/>

        <Button
            android:id="@+id/btnSignInWithPassword"
            style="@style/shared_button_secondary"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/btnSignIn"
            android:layout_marginLeft="@dimen/shared_activity_horizontal_margin"
            android:layout_marginRight="@dimen/shared_activity_horizontal_margin"
            android:layout_marginTop="@dimen/shared_view_margin_double"
            android:text="@string/registration_sign_in_biometrics_sign_in_with_web_password_button_text"/>

    </RelativeLayout>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/errorDisplaySnackbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</FrameLayout>

Any thoughts what can be causing the issue just for this device? (Might be affecting other manufacturers that manipulate the UI I guess)

Samsung S8 prompt

1

There are 1 answers

3
Shanker On

Similar issue you can find here - https://issuetracker.google.com/issues/168053593

There is nothing much you can do in your Application. It might be issue with Samsung-OEM /Android. If possible, update above ticket with your observation or create a new one in google issue tracker.