![](/img/trans.png)
[英]BottomSheetDialog not rounding top corners correctly in Android
[英]Adding a menu in Custom BottomSheetDialog Android
我有一个 BottomSheetDialog,并且我已经在它上面夸大了我的自定义布局。 但是当我尝试将菜单添加到它时。 它没有出现。
Discord 具有相同的功能,菜单出现在角落,如上图所示。 我该怎么做。 请帮帮我。
这是我的代码
//This is my ViewProfile BottomSheetDialog
public class ViewProfileFragment extends BottomSheetDialogFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
CreateView = inflater.inflate(R.layout.fragment_view_profile, container, true);
return CreateView;
}
@Override
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.view_profile_menu, menu);
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.