androidgoogle-mapsandroid-fragmentsmapsdesignmode

Fragment covers entire android editing screen


So I have an app which looks like this:

imagge

But during creating the gui I always have to create the buttons etc using the text mode because the google maps fragment blocks my entire design screen:

enter image description here

This my file:

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

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:orientation="horizontal">

    <EditText
        android:id="@+id/editText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="4"
        android:hint="Search Location" />

    <Button
        android:id="@+id/search_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight="0.5"
        android:onClick="onMapSearch"
        android:text="Search" />

</LinearLayout>


<LinearLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Type: " />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="onNormalMap"
        android:text="Normal" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="onSatelliteMap"
        android:text="Satellite" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="onTerrainMap"
        android:text="Terrain" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="onHybridMap"
        android:text="Hybrid" />

</LinearLayout>

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/map"
    android:name="com.google.android.gms.maps.SupportMapFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.viralandroid.googlemapsandroidapi.MapsActivity" />

</LinearLayout>

How can I fix this problem? Even if I have only the google maps fragment withot any other components it still blocks my entire editing screen....


Solution

  • Possible solutions: