안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
게시판을 검색해봤는데 잘 몰라서 질문 드립니다.
Scrollview로 Listview를 감쌀 경우 Listview의 내용이 전부 다 나오지 않고 짤려서 나옵니다.
xml에서 가장 상위에 있는 Scrollview를 없에면 정상적으로 Listview가 나오는데 Scrollview로 감쌀경우는
리스트뷰의 아이템이 4개라면 2개정도밖에 안보이고 하단은 짤리네요..
어떻게하죠?
<?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="fill_parent"> <TextView android:id="@+id/textDate" android:text="@string/blank" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" android:textSize="20px" android:typeface="serif" android:background="#55FFFFFF"> </TextView> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" > <TextView android:text=" TITLE" android:background="@color/background" android:textColor="@color/pen" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_marginRight="10dp"> </TextView> <TextView android:id="@+id/titleText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="15dp" android:layout_marginRight="10dp" android:layout_marginLeft="10dp"> </TextView> </LinearLayout> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" > <TextView android:text=" TIME" android:background="@color/background" android:textColor="@color/pen" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:layout_marginRight="10dp"> </TextView> <TextView android:id="@+id/timeText" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:layout_marginRight="10dp" android:layout_marginLeft="10dp"> </TextView> </LinearLayout> <LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" > <TextView android:text=" 참석자" android:background="@color/background" android:textColor="@color/pen" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:layout_marginTop="5dp" android:layout_marginRight="10dp"> </TextView> </LinearLayout> <ListView android:id="@+id/mFriendView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:lay out_marginTop="10dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" /> </LinearLayout> </LinearLayout>
height속성은 Fill 로 가득 채우는데도요..
그림파일의 리스트뷰를 가리고 있는 하얀색이 텍스트뷰입니다.