안드로이드 개발 질문/답변
(글 수 45,052)
아래와같이 구성하고 싶은데요.
잘안되네요.......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="6dip" >
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/image_logo"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/icon2" >
</ImageView>
<TextView
android:id="@+id/toptext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:textSize="20dp" />
<TextView
android:id="@+id/bottomtext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
android:textSize="20dp" />
</TableRow>
</TableLayout>
</LinearLayout>




뭐 여러가지 방법이 있겠지만... 손쉬운 리니어떡칠(?)로도 가능할 것 같네요
<루트 리니어(Horizontal orientation)>
<좌측 이미지뷰(width&height = match_parent, weight = 1)/>
<우측 두칸짜리 리니어(Vertical orientation, width&height = match_parent, weight = 1)>
<우측 첫번째 텍스트뷰 (height = match_parent, weight = 1)/>
<우측 두번째 텍스트뷰 (height = match_parent, weight = 1)/>
</우측 두칸짜리 리니어(Vertical orientation)>
</루트 리니어(Horizontal orientation)>