Reputation: 1213
I've got Activity with MapFragment and simple LenearLayout with buttons. On the image you can see little padding (about 3 dp and gray colored) between LienarLaouyt and Map. This padding belongs to mapFragment - i checked it by switching background color of main layout and linear layout. How can i remove it?
Here is the xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/select_period_button_label"
android:id="@+id/fragmentHistory_selectPeriodButton"
android:textSize="20sp"
android:layout_weight="1"
android:background="@drawable/control_button_selector"
android:textAllCaps="false" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/track_button_label"
android:id="@+id/fragmentHistory_trackButton"
android:textSize="20sp"
android:layout_weight="1"
android:background="@drawable/control_button_selector"
android:textAllCaps="false" />
</LinearLayout>
<fragment
android:id="@+id/activityDeviceCurrentLocation_map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
Upvotes: 2
Views: 1129
Reputation: 239
Try This...
<fragment
android:id="@+id/activityDeviceCurrentLocation_map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="0dp" />
Upvotes: 2