У меня есть веб-просмотр и таблица, содержащая 4 кнопки. Я установил высоту веб-просмотра на 400 пикселей, чтобы кнопки отображались внизу экрана в портретном режиме. Моя проблема в том, что при переходе в ландшафтный режим кнопки не видны. Поэтому мне нужно изменить высоту веб-просмотра во время выполнения, когда меняется ориентация. Кто-нибудь знает, как этого добиться? Я могу зафиксировать изменение ориентации, используя функцию onConfigurationChanged.
Спасибо CommonsWare, я дал XML следующим образом. Приложение вылетает при запуске.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout android:layout_alignParentTop="true">
<WebView
android:id="@+id/appView"
android:layout_height="wrap_content"
android:layout_width="fill_parent" />
</RelativeLayout>
<RelativeLayout
android:layout_alignParentBottom="true">
<TableLayout
android:id="@+id/TableLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<TableRow
android:id="@+id/TableRow01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center">
<ImageButton
android:id="@+id/more"
android:padding="1dip"
android:src="@drawable/more1"
android:layout_marginRight="15dip">
</ImageButton>
<ImageButton
android:id="@+id/albums"
android:padding="1dip"
android:src="@drawable/albums1"
android:layout_marginRight="15dip">
</ImageButton>
<ImageButton
android:id="@+id/videos"
android:padding="1dip"
android:src="@drawable/videos"
android:layout_marginRight="15dip">
</ImageButton>
<ImageButton
android:id="@+id/artists"
android:padding="1dip"
android:src="@drawable/artists1"
android:layout_marginRight="15dip">
</ImageButton>
</TableRow>
</TableLayout>
</RelativeLayout>
</LinearLayout>