Hyp*_*ype 5 android android-layout bottom-sheet
我正在寻找一种在状态栏后面绘制 BottomSheetDialogFragment 的解决方案。我尝试覆盖样式:
<style name="BaseBottomSheetDialog" parent="@style/Theme.Design.Light.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowAnimationStyle">@null</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:backgroundDimEnabled">false</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="bottomSheetStyle">@style/BottomSheet</item>
</style>
Run Code Online (Sandbox Code Playgroud)
但没有任何效果。我的父布局是fitSystemWindows="true"
编辑:我忘了提及我的 BottomSheetDialogFragment 已完全展开并且MATCH_PARENT. 也许有不同的灵魂可以在片段上获得底部工作表行为,而无需从 BottomSheetDialogFragment 扩展。