Android Question Open Menu at X,Y ?

Discussion in 'Android Questions' started by abhishek007p, Jul 23, 2015.

  1. abhishek007p

    abhishek007p Active Member Licensed User

    Is it possible to open the menu at a given x, y location? currently when i use Activity.OpenMenu it opens at bottom of the activity. i have a custom actionbar so want it to appear near the button pressed.

  2. walterf25

    walterf25 Well-Known Member Licensed User

    There are a few libraries that will allow you to do that, here is one, i'm not sure if it works with the latest android version but you can give it a try

    Good luck!
  3. Phil Ware

    Phil Ware New Member Licensed User

    I would also like to implement something similiar. Whist I agree I can use an additional library, it seems a waste given that the exisiting menu forfills my needs perfectly. All the pop up menus i've experimented with don't look as good and just add bloat/complexity to a project. Given that the "activity.openmenu" function opens at the top right of the screen when using the standard actionbar, it surely can't be hard to allow the same location when using a custom bar?

    Ideally it would be great if we could specify an X,Y loaction to open at, but failing that even a "TopRight", or "BottomCentered" type option would be great. It surely would also be a really simple implementation?
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice