私は2つの編集テキストビューを持っています。そのうちの1つにはタイトルが1行しかありません。しかし、もう片方は直線レイアウトを最後まで埋めるべきですが、そうではありません。 私はこのアプリケーションのために私の全体のXMLですので、コードを更新しました。私は誰かが間違っていることを見つけることができれば幸いですこのようにしたい部分は、addViewという名前のLinearLayout内の部分です。edittextビューを作成する方法はアンドロイドの親要素を埋めてください
<?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はFramLayoutの内側にあり、ボタンをクリックすると、LinearLayout addViewの上端が左にスライドします。 addViewレイアウトはメモを追加するフォームでなければなりません。 – a13ks
私は答えを見つけた – a13ks