0
ボタンの右側に配置されるまで、EditTextですべての使用可能な領域を右側に埋めるようにします。私はこのようなビューを構築するためにRelativeLayoutを使用しています。しかし結果として私は私のボタンを見ることができません、唯一のEditText。両方を見えるようにする方法をアドバイスしてください。RelativeLayoutを使用して1つの行に2つのビューを配置する
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<EditText
android:id="@+id/edit_text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Task description">
</EditText>
<Button
android:id="@+id/ok_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OK"
android:layout_toRightOf="@id/edit_text">
</Button>
</RelativeLayout>
</LinearLayout>
これは機能しています、ありがとうございます。 – Eugene