У меня есть два вида edittext. У одной из них есть только одна строка, ее название. Но другой должен заполнить линейный выход до конца, но это не так. Я обновил код, так что это весь мой xml для этого приложения. Надеюсь, кто-то найдет, что случилось. Часть, которую я хочу сформировать, является частью внутри LinearLayout с именем addView.Как сделать вид edittext заполнить родительский элемент в android
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#ffffff">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<Button
android:id="@+id/addButton"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="@drawable/addbuttonstyle"
android:layout_weight="20"/>
<ImageView
android:id="@+id/titleView"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="@drawable/titleview"
android:layout_weight="60"/>
<Button
android:id="@+id/orderButton"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="@drawable/orderbuttonstyle"
android:layout_weight="20"/>
</LinearLayout>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/addView"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<EditText
android:id="@+id/textBoxTitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="note title"
android:singleLine="true"
/>
<EditText
android:id="@+id/textBoxContent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:hint="content"
/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/backgroundLayout"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/background"
/>
</FrameLayout>
Это не сработало. Я обновил свой код, так что теперь вы можете увидеть весь мой xml. LinearLayout tha находится внутри FramLayout и поверх слайдов addView LinearLayout слева, когда я нажимаю кнопку. Макет addView должен быть формой добавления примечаний. – a13ks
Никогда не находил ответа – a13ks