要使BottomSheetDialog与父高度匹配(全屏),可以按照以下步骤进行操作:
<style name="CustomBottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
<item name="android:background">@android:color/transparent</item>
<item name="android:windowIsFloating">false</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowSoftInputMode">adjustResize</item>
<item name="android:windowFullscreen">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
BottomSheetDialog bottomSheetDialog = new BottomSheetDialog(context, R.style.CustomBottomSheetDialog);
View view = LayoutInflater.from(context).inflate(R.layout.bottom_sheet_layout, null);
bottomSheetDialog.setContentView(view);
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- 添加你需要的内容 -->
</LinearLayout>
bottomSheetDialog.show();
通过以上步骤,可以使BottomSheetDialog与父高度匹配,实现全屏效果。
关于腾讯云相关产品和产品介绍链接地址,由于要求不能提及具体品牌商,无法提供相关链接。但腾讯云提供了丰富的云计算服务,你可以通过访问腾讯云官方网站,查找相关产品和文档。
领取专属 10元无门槛券
手把手带您无忧上云