Android Question How can I make such a menu?

ThePuiu

Active Member
Licensed User
Longtime User
I saw in a commercial application (Glovo) a menu (in fact it is just a button) that I like very much and I would like to replicate it. The button is actually an area at the bottom of the screen where you can perform a slide operation. After the drawn area reaches a certain size (1/3 of the screen height) it becomes another page.
To better explain I attached 2 images: one in which the menu is in the normal state and the other during the wipe operation. Can anyone help me with an idea how I could do this?
 

Attachments

  • 1.JPG
    1.JPG
    16.7 KB · Views: 365
  • 2.JPG
    2.JPG
    16.7 KB · Views: 385

Brandsum

Well-Known Member
Licensed User
  1. Create a panel with an image view at the top
  2. then place another panel below the imageview inside the first panel.
  3. Now set the background color of first panel to transparent and child panel to white.
  4. Set an image like the example arc to the imageview
  5. Set child panel height to 100%y and main panel height to 100%y + imageview height.
  6. Set main panel top to 100%y - imageview height
  7. Write a touch event sub of the main panel and write your code to detect action down and action move
  8. on action move set the panel top as you drag upward. and check if the top is 1/3 of the screen set top of the main panel to 0%y - imageview height
  9. On touch up if the top is less than 1/3 of the screen set main panel height back to 100%y - imageview height
 
Upvote 0
Top