Embed google map for Android app

Hi, I want to use the google map in my application, but I also want to create my own footer menu for it. Therefore, it should look like a header - google map - footer from top to bottom. I tried adding relativeLayout and linearLayout to insert into mapview, but I did not achieve this.

Can you give me an example or tell me about it?

+5
source share
1 answer

Read layout weight - http://developer.android.com/guide/topics/ui/layout-objects.html

0, 1 0, , , . , :

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

        <!-- Header -->
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0"
        />

        <!-- Map -->
        <MapView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            ....
        />

        <!-- Footer, or another embedded Layout -->
        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0"
        />
</LinearLayout>
+9

All Articles