How to make a edittext view fill the parent element in android

farhadhamed

New Member
I have two edittext views. One of them has only one line, its the title. But the other one should fill the linearlayout to the end, but it doesn't.I updated the code so this is my whole xml for this app. I hope someone can find what's wrong. The part that i want to form like this is the part inside the LinearLayout named addView.\[code\]<?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>\[/code\]
 
Back
Top