В настоящее время у меня есть макет, как показано на изображении (как видно из xml), у WebView есть предопределенное значение layout_height. Мне просто нужен этот точный вид, но масштабируемая версия, которая не нуждается в предопределенных значениях. Таким образом, ярко-синяя секция должна иметь высоту, пропорциональную кнопке, и всегда должна быть внизу, а верхняя панель с URL EditText и т. Д. Должна действовать одинаково. Таким образом, WebView должен иметь возможность масштабирования до любого размера, чтобы убедиться, что все пространство занято.перекрытие UI для UI Проблема
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
tools:context=".MainActivity" >
<LinearLayout
android:id="@+id/fullscreen_content_controls"
style="?buttonBarStyle"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="9dp"
android:padding="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<EditText
android:id="@+id/editText1"
android:layout_width="284dp"
android:layout_height="wrap_content"
android:layout_weight="0.97"
android:ems="10"
android:hint="Enter URL"
android:imeOptions="actionGo"
android:singleLine="true"
android:textColor="@android:color/darker_gray"
android:inputType="textNoSuggestions">
</EditText>
<Button
android:id="@+id/button1"
android:layout_width="30dp"
android:layout_height="31dp"
android:layout_marginRight="5dp"
android:background="@android:drawable/btn_dialog" />
<ProgressBar
android:id="@+id/progressBar1"
style="?android:attr/android:progressBarStyleSmall"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="0.10" />
</LinearLayout>
</FrameLayout>
<WebView
android:id="@+id/fullscreen_content"
android:layout_width="match_parent"
android:layout_height="724dp"
android:layout_gravity="center"
android:layout_weight="0.75"
android:keepScreenOn="true" />
<LinearLayout
android:id="@+id/controlLinearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.97"
android:background="@android:color/holo_blue_bright" >
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
Столкнулись это на устройствах/эмуляторы различных размеров, чтобы увидеть, если это правильно? Я также предлагаю не использовать строгие значения чисел для ширины. Например, с помощью вашего EditText вы всегда можете установить его в match_parent, а затем добавить запас для другого бита. –