layout
을 작성해야하지만 완벽하지는 않습니다.레이아웃을 상대적 레이아웃으로 작성하십시오.
이
이 방법
나는이 RelativeLayout
를 사용하여이에서만 만들 필요가 만드는 오전을 필요지고. 나는이 내 코드
<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의를 사용하는 경우, 안드로이드 중 하나와 함께 연주 해 봅니다 : paddingTop 또는 안드로이드 : paddingBottom에 대한 TextView ... – Ahmed