Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounded corners when tap and hold #181

Open
konopkoman opened this issue Feb 26, 2019 · 0 comments
Open

Rounded corners when tap and hold #181

konopkoman opened this issue Feb 26, 2019 · 0 comments

Comments

@konopkoman
Copy link

konopkoman commented Feb 26, 2019

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant