Я пытаюсь сделать верхние углы моего BottomSheetDialog скругленными, но мне не повезло ни с чем в Интернете. Вот как бы я хотел, чтобы это выглядело:
![Rounded Modal Bottom Sheet](https://i.stack.imgur.com/pMT56.png)
Независимо от того, что я пробовал, я получаю это:
![Not rounded Modal Bottom Sheet](https://i.stack.imgur.com/L2XrD.png)
Я пробовал метод здесь и использовал shapeAppearanceLargeComponent (то, что я использую сейчас).
Вот мой код:
стилей. xml
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
<!-- Customize your theme here. -->
...
<item name="shapeAppearanceLargeComponent">@style/CustomShapeAppearanceBottomSheetDialog</item>
</style>
<style name="CustomShapeAppearanceBottomSheetDialog" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSizeTopRight">16dp</item>
<item name="cornerSizeTopLeft">16dp</item>
</style>
BottomNavMenuFragment:
public class BottomNavMenuFragment extends BottomSheetDialogFragment {
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_bottom_nav_drawer, container, false);
}
}
И вот как я показываю фрагмент:
BottomNavMenuFragment navFragment = new BottomNavMenuFragment();
navFragment.show(getSupportFragmentManager(), navFragment.getTag());
Ничего из того, что я делаю, похоже, не работает. Может ли кто-нибудь указать мне правильное направление?