このようなテーブルレイアウトを作成する必要があります。いろいろやってみたのですが、同じようにはできません。
ここに私が達成しようとしているもののスクリーンショットがあります。
ありがとうございました。
このようなテーブルレイアウトを作成する必要があります。いろいろやってみたのですが、同じようにはできません。
ここに私が達成しようとしているもののスクリーンショットがあります。
ありがとうございました。
RelativeLayoutはこれを簡単に実現できると思います。
まあ、あなたの要件に応じていくつかの変更を加えて、このようにすることができます..
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/background_light" >
<LinearLayout
android:id="@+id/first_row"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Nombre : "
android:textColor="@android:color/black" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Enter your field"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:id="@+id/second_row"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/first_row"
android:orientation="horizontal"
android:weightSum="3" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Localizame" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Nombre : "
android:textColor="@android:color/black" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Enter your field"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_below="@id/second_row"
android:id="@+id/third_row"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Latitud : "
android:textColor="@android:color/black" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Enter your field"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:id="@+id/fourth_row"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/third_row"
android:orientation="horizontal"
android:weightSum="2" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Anadir Amigo" />
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:hint="Enter your field"
android:textColor="@android:color/black" />
</LinearLayout>
</RelativeLayout>