如何解决生物识别提示宽度问题三星S8
我已经在我的一个应用程序中实现了BiometricsPrompt,发现该对话框仅针对Samsung S8无法正确显示。我已经用不同的分辨率测试了Samsung S10,Pixel 4,Nokia 6和Android模拟器,因此我认为问题可能出在Samsung自定义UI层。
我正在使用androidx.biometric:biometric:1.0.1,并且Activity的布局如下:
<?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>
有什么想法会导致此设备出现问题? (我想可能会影响其他操纵UI的制造商)
解决方法
类似的问题,您可以在这里找到-https://issuetracker.google.com/issues/168053593
您在应用程序中无能为力。三星OEM / Android可能有问题。如有可能,请根据您的观察更新上述故障单,或者在Google问题跟踪器中创建一个新的故障单。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。