Please let me set setClipToOutline(true) to round corners when menu item is pressed and hold. In my case I set Adapter with menu item, then I use setContentBackgroundResource to set rounded corners for dialog (top-lefr, top-right) and this works fine. But when I press a menu item, corners of pressed item is still visible. Please see my code bolow.
dialogContextMenu = DialogPlus.newDialog(getContext())
.setAdapter(adapter)
.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
//some logic
dialogContextMenu.dismiss();
}
})
.setExpanded(false)
.setContentBackgroundResource(R.drawable.bg_rounded_menu_bottom)
.setContentHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
.create();
dialogContextMenu.getHolderView().setClipToOutline(true); //todo fix rounded corners then pressed, currently it doesn't works
dialogContextMenu.show();
Please let me set
setClipToOutline(true)
to round corners when menu item is pressed and hold. In my case I set Adapter with menu item, then I usesetContentBackgroundResource
to set rounded corners for dialog (top-lefr, top-right) and this works fine. But when I press a menu item, corners of pressed item is still visible. Please see my code bolow.