<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="fitStart"
android:src="@drawable/splash_bg" />
<ImageView
android:id="@+id/photo_area"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_margin="20dp"
android:adjustViewBounds="true" />
<TextView
android:id="@+id/share_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/photo_area"
android:layout_marginLeft="20dp"
android:text="@string/share_title"
android:textColor="@android:color/white" />
<EditText
android:id="@+id/share_content"
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_below="@+id/share_title"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:background="@drawable/custom_textarea"
android:gravity="top|left"
android:hint="default message" />
<ImageView
android:id="@+id/share_submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/share_content"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:src="@drawable/photo_taken_btn_submit" />
</RelativeLayout>
</ScrollView>
Это xml макета. По умолчанию в photo_area нет набора изображений, но он загрузит изображение из Интернета и настроит его. Проблема в том, что высота представления содержимого больше, чем должна быть, поэтому в конце есть много свободного места. Я пытаюсь удалить фон в linearlayout, высота немного уменьшилась, но все же есть какое-то пустое пространство, как его исправить? СпасибоПочему высота прокрутки больше, чем фактическое содержание
Загрузить один щелчок –