2012-02-07 1 views

답변

1

두 개의 레이아웃 중 하나를 사용하여 목록보기에서 하나는 버튼을 사용하고 다른 하나는 Listview를 사용합니다.이 버튼은 고정 된 상태로 유지되는 솔루션입니다.

<RelativeLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     > 
    <Button 
    android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_centerHorizontal="true" 
     />  
    </RelativeLayout> 

    <ListView 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
    </ListView> 
+0

나는 listview를 드래그 할 때 이미 그것을 보았습니다. 보이지 않습니다. 그리고 layout_width = "fill_parent"로 바뀌 었습니다. 제대로 보이지 않습니다. –

0

Listview와 버튼을 묶으려면 상대적 레이아웃을 사용하십시오. 버튼 사용 속성 alignParentBottom = true ...

+0

나는 단추가 고정 된 상태로보기를 원합니다. Nitesh의 레이아웃에서 –

+0

... 목록보기와 버튼을 상대적 레이아웃으로 둘러 쌉니다. fill_parent 대신 wrap_content로 listview의 layout_height를 작성하십시오. – Relsell

관련 문제