【发布时间】:2014-02-25 18:26:05
【问题描述】:
我有以下布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="3"
android:id="@+id/fragment_send_imageView"
android:layout_margin="0dp"
android:padding="0dp"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:padding="0dp"
android:layout_margin="0dp">
<com.google.android.gms.maps.MapView
android:id="@+id/fragment_send_mapView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</LinearLayout>
在我的设备上是这样的:
如您所见,有两个“分隔线”——一个位于应用程序窗口的顶部边框和 ImageView 之间,第二个位于 ImageView 和 MapView 之间。我已将填充/边距设置为 0 - 不走运。我该怎么办?
【问题讨论】:
-
为你的图像视图尝试 scaletype = fitxy
-
这是由于图像而发生的。试试@TamilselvanKalimuthu 的回答
标签: android android-linearlayout spacing