Я сделал один TableView, в котором я хочу установить каждый и каждый контейнер в середине каждой строки, и в одной строке есть несколько текстовых представлений, а затем, как их установить. , , ?
Код как ниже:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:stretchColumns="1">
<TableRow>
<TextView android:text="Name" android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="Address" android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="E-Mail" android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="Phone No." android:gravity="center"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</TableRow>
<View android:layout_height="3dip" android:background="#FF909100" />
<TableRow>
<TextView android:text="Shreyash" android:textColor="#FF778899"
android:gravity="center" />
<TextView android:text="Godhra" android:textColor="#FF778899"
android:gravity="center" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="sbm_mahajan" android:textColor="#FF778899"
android:gravity="center" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:text="9825056129" android:textColor="#FF778899"
android:gravity="center" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</TableRow>
<View android:layout_height="2dip" android:background="#FF909060" />
</TableLayout>
см. Изображение ниже: