0
이것은 제 레이아웃이고 테이블 레이아웃을 코딩하여 테이블 행에 추가하고 싶습니다.테이블 레이아웃이 내 레이아웃의 내용을 감싸고 있습니다.
layout.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/bgblack"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout1" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/bgblack"
android:orientation="vertical" >
<TextView
android:id="@+id/section_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout1"
android:background="@color/Grey"
android:padding="2dp"
android:text="@string/section_phone"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@android:color/white"
android:textStyle="bold" />
<RelativeLayout
android:id="@+id/detail_phone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/section_phone" >
<TableLayout
android:id="@+id/list_phone"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</TableLayout>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
tablerow.xml
<?xml version="1.0" encoding="utf-8"?>
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/details"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/detail_phone_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/Blue" />
<TextView
android:id="@+id/detail_phone_subtitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableRight="@drawable/ic_contact_call"
android:padding="5dp"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@android:color/white" />
</LinearLayout>
</TableRow>
하지만 출력 테이블 행의 전체 폭에 오지 않을 때 참조. 그것은 단지 포장 내용으로오고있다.
출력
그래서 당신이 날 전체 화면으로 출력을하는 데 도움이 될 수 있습니다?
감사합니다. Shaiful ... 이것은 내가 원하는 것입니다. 잘 작동합니다. –