Итак, я пишу это приложение для работы с изображениями, и после того, как пользователь выберет изображение из галереи, у меня появится страница параметров с несколькими элементами управления вверху и предварительным просмотром выбранного изображения в середине.Внизу также есть кнопка «Пуск», но если изображение достаточно высокое, кнопка закрывается.
Я рассмотрел изменение размера изображения до определенной высоты, которая работает, но эта высота будет меняться наразные устройства.В идеале я бы хотел, чтобы изображение занимало как можно больше места между элементами управления и кнопкой, но я просто не могу понять, как это сделать.Я попытался использовать вертикальную разметку таблицы, но это не имело никакого значения.
На этом изображении окно эмулятора справа.![The emulator is on the right.](https://i.stack.imgur.com/3gFll.png)
Вот мой XML.Немного грязно, но здесь идет:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/linearLayout" android:orientation="vertical"
android:layout_height="wrap_content" android:padding="10px"
android:layout_width="fill_parent">
<TextView android:textSize="18px" android:text="GIF Options"
android:id="@+id/textView3" android:layout_width="wrap_content"
android:layout_height="wrap_content">
</TextView>
<TableLayout android:id="@+id/tableLayout"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:stretchColumns="1">
<TableRow>
<TextView android:layout_height="wrap_content" android:text="FPS:"
android:id="@+id/TextView1" android:layout_width="wrap_content"
android:enabled="false" android:textSize="17px"></TextView>
<EditText android:text="20" android:inputType="numberDecimal"
android:id="@+id/EditTextFPS" android:numeric="decimal"
android:singleLine="true" android:layout_height="wrap_content"
android:layout_width="wrap_content" android:digits="2"
android:width="50px"></EditText>
</TableRow>
<TableRow>
<TextView android:layout_height="wrap_content" android:text="Frames:"
android:id="@+id/TextView2" android:layout_width="wrap_content"
android:enabled="false" android:textSize="17px"></TextView>
<EditText android:layout_width="wrap_content"
android:layout_height="wrap_content" android:text="70"
android:inputType="numberDecimal" android:id="@+id/EditTextFrames"
android:numeric="decimal" android:singleLine="true" android:digits="2"></EditText>
</TableRow>
<TableRow>
<TextView android:layout_height="wrap_content" android:text="Saturation Boost: "
android:id="@+id/TextView2" android:layout_width="wrap_content"
android:enabled="false" android:textSize="17px"></TextView>
<SeekBar android:layout_height="wrap_content"
android:layout_width="fill_parent" android:id="@+id/seekBar1"
android:layout_alignParentLeft="true" android:max="10"></SeekBar>
</TableRow>
</TableLayout>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textView4"
android:layout_gravity="center" android:text="Chosen Image"
android:textSize="16px"></TextView>
<ImageView android:layout_width="wrap_content" android:src="@drawable/icon"
android:layout_gravity="center" android:id="@+id/optionspreview"
android:isScrollContainer="true" android:layout_height="fill_parent"></ImageView>
<Button android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textSize="22px"
android:id="@+id/startbutton" android:text="Start!"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true" android:layout_gravity="center"></Button>
</LinearLayout>