안드로이드 개발 질문/답변
(글 수 45,052)
그림과 같이 표를 생성해서 표안에 색을 넣고 싶습니다...그런데
아래가 표를 그려놓은 레이아웃의 소스입니다
레이아웃이 이상해서인지...색을 넣으면 조금씩 자리가 남습니다 ㅠㅠ
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#FFFFFF"
>
<ScrollView
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:scrollbars="none"
android:background="#CCFFCC"
>
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:scrollbars="none"
android:background="#CCFFCC">
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
>
<TableRow android:background="#CCFFCC">
<TextView android:text="" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:gravity="center"
android:textStyle="bold" android:textColor="#000000" android:background="#CCFFCC" />
<TextView android:text="" android:layout_height="wrap_content"
android:layout_width="fill_parent" android:gravity="center"
android:textStyle="bold" android:textColor="#000000"
android:background="#CCFFCC" />
<TextView android:id="@+id/text0" android:textSize="20sp" android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="left" android:paddingRight="50px" android:textStyle="bold" android:textColor="#000000" android:background="#CCFFCC" />
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:stretchColumns="1" android:textStyle="bold" android:textColor="#000000" android:background="#CCFFCC"><TableRow>
<TextView android:gravity="center_vertical" android:layout_width="1px" android:layout_height="fill_parent" android:background="#CCFFCC" /> </TableRow>
</TableLayout>
</TableRow><View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#CCFFCC"/>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- ///////////////////////////////////////////-->
<TableRow>
<TextView
android:id="@+id/text1"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
><TableRow>
<TextView
android:text="\n\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text2"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/>
</TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- ///////////////////////////////// -->
<TableRow>
<TextView
android:id="@+id/text3"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
><TableRow>
<TextView
android:text="\n\n\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text4"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- /////////////////////////////////////////////////////////////// -->
<TableRow>
<TextView
android:id="@+id/text5"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text6"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- /////////////////////////////////////////////////////////////// -->
<TableRow>
<TextView
android:id="@+id/text7"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text8"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- /////////////////////////////////////////////////////////////// -->
<TableRow>
<TextView
android:id="@+id/text9"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text10"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- /////////////////////////////////////////////////////////////// -->
<TableRow>
<TextView
android:id="@+id/text11"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text12"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- /////////////////////////////////////////////////////////////// -->
<TableRow>
<TextView
android:id="@+id/text13"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text14"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- /////////////////////////////////////////////////////////////// -->
<TableRow>
<TextView
android:id="@+id/text15"
android:textSize="18sp"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:gravity="center_vertical"
android:paddingLeft="50px"
android:paddingRight="50px"
android:textStyle="bold"
android:textColor="#000000"
android:background="#CCFFCC"
/>
<TableLayout
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
<TextView
android:id="@+id/text16"
android:textSize="16sp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="10px"
android:paddingRight="10px"
android:textColor="#232631"
/>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stretchColumns="1"
android:background="#FFFFFF"
><TableRow>
<TextView
android:text="\n\n\n\n"
android:gravity="center_vertical"
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="#33000000"
/> </TableRow>
</TableLayout>
</TableRow>
<View
android:gravity="center|center_vertical"
android:layout_width="fill_parent"
android:layout_height="1px"
android:layout_weight="1"
android:background="#33000000" />
<!-- /////////////////////////////////////////////////////////////// -->
<TextView
android:id="@+id/text17"
android:text="\n * 수면 내시경시 수면 관찰료 10만원이 추가됩니다.\n"
android:gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="@color/white"
android:background="#000000"
/>
</TableLayout> </HorizontalScrollView> </ScrollView> </LinearLayout>



