如何删除屏幕底部的这个空白区域。我也试过android:adjustviewbounds
和android:scaletype
。但仍未能删除屏幕底部的空白区域。请帮助我优化我的布局,以便从底部移除这个丑陋的空白空间。删除屏幕底部的空白Android
下面是我的布局屏幕截图。
这里是布局的我的XML代码。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="wrap_content"
android:layout_width="match_parent"
tools:context="com.example.zohai.v360.Fragments.Home">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="190dp"
android:layout_marginTop="-15dp">
<ImageView
android:id="@+id/intro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:adjustViewBounds="true"
android:background="@drawable/intro"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="190dp"
android:layout_marginTop="-15dp"
>
<ImageView
android:id="@+id/photog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/photographers"
android:adjustViewBounds="true"
android:scaleType="fitXY"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="190dp"
android:layout_marginTop="-14dp">
<ImageView
android:id="@+id/model"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/model_bg"
android:adjustViewBounds="true"
android:scaleType="fitXY"
/>
</LinearLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
这是空白部分,因为在3x190之后屏幕仍然有一些高度,您为什么使用负边距...? –
我可以从你的问题中了解到,你有这三张照片,你希望它占据你的整个屏幕,不留空白。这是你想要的吗? –
是的,这正是我想要的 –