私のアプリケーションでは、ユーザーがヘッダーテキストとコンテンツテキストを入力できるようにUIを作成したいと考えています。しかし、コンテンツテキストは画面の残りの領域全体を満たす必要があり、 'textBottomType'は画面の一番下になければなりません。 どうすれば 'textInputContent'が空の画面領域全体を埋めることができますか? UIでさまざまなことを試しましたが、以下は私のコードです。全画面領域をTextInputLayoutで塗りつぶす
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/content_user_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:showIn="@layout/activity_user_view">
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="2dp">
<AutoCompleteTextView
android:id="@+id/textInputHeaderInformation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Your Header"
android:inputType="text"
android:maxLines="1"
/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
android:id="@+id/textInputContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/textInputHeader"
android:padding="2dp">
<EditText
android:id="@+id/textInputContentInformation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Enter Your Content"
android:inputType="text"
android:layout_weight="1"
/>
</android.support.design.widget.TextInputLayout>
<LinearLayout android:orientation="horizontal" android:layout_marginTop="12dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/background1"
android:layout_below="@+id/textBottomType"
android:layout_alignParentStart="true">
<ImageView android:src="@android:drawable/ic_popup_reminder" android:layout_margin="@dimen/card_margin"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:text="Important Information"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textAlignment="center"
android:textStyle="normal|bold"
android:textColor="@color/winter"
android:textSize="18sp" />
</LinearLayout>
</RelativeLayout>
おかげで、
IamHuM
これは変更された外観です。この問題では、「あなたのコンテンツを入力してください」というテキストは1行のテキストですが、この中に複数行のテキストを入力します。どのように私は、画面全体がコンテンツのテキストでいっぱいになることができるように、ユーザーが複数行のテキストを入力できるようにすることができます。 – IamHuM
メインの質問に現在のUIと予想されるUIの画像を追加しました。 – IamHuM
以下に示すコードを変更しました – IamHuM