It is necessary to make by clicking on the button the opening of something like the context menu in such a way that it would open not in the center of the screen, but next to this button. By analogy, as in the Play Store, when you click on an element of three points that open the context menu. alt text

What do you need to use for this?

  • one
    I remember in the old book on Android there was information on creating a context menu for View on the screen. Look for it. - Lucky_spirit
  • @Lucky_spirit The context menu opens in the center of the screen. And I need it with reference to the button - Maria_1
  • one
    Well, set the coordinates for the context menu. Or Gravity in relation to the parent. - Lucky_spirit

1 answer 1

Use the PopupMenu class, and when creating, select the desired button as an anchor.