Create menu button at the bottom in Google maps v2 android

Asked

Viewed 561 times

1

How to create the Menu button equal to the Maps App. Below is an example in the red square.

Someone could set an example ?

inserir a descrição da imagem aqui

2 answers

1

You can use Relativelayout on the whole screen, place an Imageview with the image you want to be your "button" and use the attributes android:layout_alignParentBottom="true" android:layout_alignParentLeft="true"

Then a `layout_marginBottom="5dp" not to stick to the bottom.

Following example:

<RelativeLayout
    android:id="@+id/map"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/button_drawer"
        android:src="@drawable/ic_drawer_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_marginBottom="5dp"/>

</RelativeLayout>
  • More is to leave with that white background, with the shadow and the edge ?

  • You can use the image you want. If you want to use shadow that is not in the image use a Shape

1

I believe it’s a Drawerlayout:

It allows a Fragment to be "hidden" to the left or right of the screen.

  • So until then blz, I talk about how to create this interface or be this button model, with Toolbar I can, but I wanted the image way.

  • It would be interesting to add key code snippets to your answer, as the URL may go down...

  • João Paulo Pulga, I think you don’t understand the question, I’m looking for snippets of code and/ or examples of how I make that button...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.