このようにlayout
を作成する必要がありますが、完全にはできません。相対レイアウトでレイアウトを作成
この
を取得、私はRelativeLayout
を使用して、これを作成し、これだけで作成する必要があるのです
この方法が必要です。私はそれはあなたのTextView
とEditText
が同じサイズでないようで、これは私のコード
<RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="15dp">
<TextView android:text="Title" android:textColor="#ffffff" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="18dp" android:padding="5dp"
android:background="@drawable/tab_cyan" android:id="@+id/title_add_txt"/>
<EditText android:hint="Address Title" android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/address_title" android:layout_toRightOf="@id/title_add_txt"/>
<TextView android:text="Address" android:textColor="#ffffffff" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:textSize="18dp" android:padding="5dp"
android:background="@drawable/tab_cyan" android:layout_below="@id/title_add_txt"
android:id="@+id/address_txt"/>
<EditText android:hint="Address" android:layout_width="match_parent" android:layout_height="wrap_content"
android:id="@+id/address" android:layout_below="@id/address_title" android:layout_toRightOf="@id/address_txt"/>
</RelativeLayout>
私はあなたがこのシナリオでTablelayoutを使用していない理由はわからないが、あなたはRelativeLayoutを使用する必要がある場合は、Androidのどちらかで遊んでみてください:paddingTopやアンドロイド:paddingBottomのためのTextView ... – Ahmed