I
I
Insolent Muzzle2020-12-02 15:47:19
Java
Insolent Muzzle, 2020-12-02 15:47:19

How to create a custom context menu?

I wrote a program for android and ran into a problem with the implementation of the context menu. The standard option does not suit me for several reasons:

  1. Functionality. You cannot insert separators into a regular menu, submenus (possibly with a submenu)
  2. Appearance. The appearance of the standard menu depends on the system and cannot be customized. Accordingly, you don’t even have to think about beautiful design and themes.

How can I make a custom context menu? No, maybe I'm not keeping up with something and you can implement everything in the standard menu. If so, please describe how to do it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2020-12-02
@pluffie

It is impossible to customize the default one, yes. Show the list.
But you can transfer your View to it, designed as your heart desires.

PopupWindow(View contentView, int width, int height, boolean focusable)

Watch diss , two

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question