Dialog Open on Recycler view Row button click
<p>In Recycler View I click on a button add to cart a dialog is open.
In Recycler view adapter</p>

<pre><code>@Override
public void onBindViewHolder(final ViewHolder holder, int position) {

    holder.addtocart.setOnClickListener((Mp3HindiLandingActivity) context);
}
</code></pre>

<p>In My Activity(Mp3HindiLandingActivity)</p>

<pre><code>          @Override
         public void onClick(final View v) {
    switch (v.getId()) { case R.id.addtocart:
            PopupMenu popup = new PopupMenu(ctx, v);
            popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
                @Override
                public boolean onMenuItemClick(MenuItem item) {
                    switch (item.getItemId()) {
                        case R.id.menu1:

                            Toast.makeText(v.getContext(), "FriendRequest", Toast.LENGTH_LONG).show();
                            return true;
                        case R.id.menu2:
                            Toast.makeText(v.getContext(), "Block | Hide ", Toast.LENGTH_LONG).show();
                            return true;
                        default:
                            return false;
                    }
                }
            });
            popup.getMenuInflater().inflate(R.menu.menu, popup.getMenu());
            popup.show();

            break;`
           }}
</code></pre>

<p>It Shows the the menu below addtocart icon but I need the menu items having different background as per the image attached?</p>

<p>Please let me know how this will be implemented
<a href="https://i.stack.imgur.com/fmytL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fmytL.jpg" alt="Please Refer Image"></a></p>