解释图像:-
(编辑图像以隐藏徽标)
问题= BottomSheetFragment在底部可见经过测试的设备= Samsung,RealMe =两者均使用android 10
欢迎页面的XML
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".welcome.Welcome">
<include layout="@layout/activity_welcome_content" />
<include layout="@layout/fragment_sign_in" />
<include layout="@layout/fragment_sign_up" />
<include layout="@layout/fragment_forgot_password" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
xml
代码在所有片段中使用
app:behavior_hideable="true"
app:behavior_peekHeight="0dp"
app:layout_behavior="@string/bottom_sheet_behavior"
还实现了此theme
以具有工作表的自定义设计,并且具有默认工作表的不可见背景
<style name="AppBottomSheetTheme" parent="Theme.Design.Light.BottomSheetDialog">
<item name="bottomSheetStyle">@style/AppModalStyle</item>
</style>
<style name="AppModalStyle" parent="Widget.Design.BottomSheet.Modal">
<item name="android:background">@color/trans</item>
<item name="behavior_hideable">true</item>
<item name="behavior_peekHeight">500dp</item>
</style>
也在welcome
类中也尝试过此方法>
//using kotlin forgotSheetBehavior.isHideable = true forgotSheetBehavior.state = BottomSheetBehavior.STATE_HIDDEN
仍然在底部看到
BottomSheetDialogFragment
,这在使用Android 10的像素模拟器中不可见
解释图像:-登录按钮=显示登录视图注册按钮=显示注册视图忘记密码底页(编辑图像以隐藏徽标)问题=可见BottomSheetFragment ...