android - 生物识别提示宽度问题三星 S8
问题描述
我已经在我的一个应用程序中实现了 BiometricsPrompt,发现该对话框仅适用于三星 S8 并没有正确显示。我已经用不同的分辨率测试了三星 S10、Pixel 4、诺基亚 6 和 Android 模拟器,所以我相信问题可能出在三星自定义 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
在您的应用程序中您无能为力。Samsung-OEM /Android 可能有问题。如果可能的话,用你的观察更新上面的票,或者在谷歌问题跟踪器中创建一个新的票。
推荐阅读
- android - 如何找到edx android app下载的课程视频的标题。?
- swift - MTKView 委托不起作用
- windows - C930 网络摄像头不显示 h264 流
- c# - 如何将sdf转换为excel?
- javascript - NGRX 操作已调度,但效果未触发
- python - KeyError 试图绘制一个过滤的数据框
- r - 如何按行对具有相同名称的所有列的所有观察结果求和?
- android - 致命异常:java.lang.NoClassDefFoundError com.google.android.gms.internal.firebase-perf.zzw
- python - Scrapy - 抓取子元素 - 抓取 CSS 选择器的错误部分
- excel - VBA计算匹配颜色和特定文本的单元格