2012-06-08 3 views
0

두 개의 버튼 사이에있는 ListView가 있습니다. 나는 목록보기가 볼 수 있도록 충분한 공간을 차지하기 위해 얻을 수있는 방법 코드의 목록보기에 항목을 추가하면 전체 화면이 ScrollViewAndroid : ListView를 확장하여 두 항목 사이에 공백을 채우십시오.

<Button 
     android:text="Take a Picture" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/btnPicture" 
     android:layout_marginRight="3dp" 
     android:layout_marginLeft="3dp" 
     android:layout_marginTop="5dp" 
     android:textSize="25dp"/> 
    <ListView 
     android:minWidth="25px" 
     android:minHeight="25px" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/lstPhotos" 
     android:visibility="gone" /> 
    <Button 
     android:text="Location Type" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:id="@+id/btnLocationType" 
     android:layout_marginRight="3dp" 
     android:layout_marginLeft="3dp" 
     android:layout_marginTop="5dp" 
     android:textSize="25dp" /> 

입니다. 1 개의 항목을 표시하도록 확장되지만 두 번째 항목을 추가 한 후에는 더 이상 확장되지 않습니다.

두 번째 그림 행을 목록보기에 추가 한 후에 볼 수 있습니다. 보이지 않습니다.

enter image description here

답변

관련 문제