![](/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.