2011-05-16 4 views
2

버튼이 수직으로 배치 된 LinearLayout 안에 있습니다. 버튼이 표시되지 않는 이유를 모르십니까? 당신의 LinearLayout이 추가버튼이 선형 배열에 나타나지 않습니다.

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"> 
<com.commonsware.cwac.tlv.TouchListView 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tlv="http://schemas.android.com/apk/res/org.stocktwits.activity" 

    android:id="@android:id/list" 
    android:layout_width="fill_parent" 
    android:drawSelectorOnTop="false" 
    tlv:normal_height="64dip" 
    tlv:grabber="@+id/icon" 
    tlv:remove_mode="slideRight" 
android:layout_height="wrap_content"/> 
<Button android:text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> 

</LinearLayout> 
+0

TouchListView를 (일시적으로) 꺼내면 나타나나요? –

+0

android : id = "@ android : id/list"이 맞습니까? 올바른 하나는 android : id = "@ + id/list"라고 생각합니다. – evilone

+0

TouchListView를 꺼내면 나타납니다. 또는 레이아웃에 단추가없는 TouchListView도 나타납니다. –

답변

1

android:height="wrap_content"ListView과 같은 세로 스크롤 가능한 위젯에는 아무런 의미가 없습니다. 달성하고자하는 모양을 달성하려면 을 LinearLayout 또는 RelativeLayout과 함께 사용하십시오.

+0

예제를 보여줄 수 있습니까? 나는 상대적 레이아웃에서 목록 아래에 버튼을 지정하려했지만 행운이 없다. –

+0

@ Shehean Alam : http://stackoverflow.com/questions/5678284/button-below-a-list-not-showing – CommonsWare

1

시도 :

android:layout_width="fill_parent" 
android:layout_height="fill_parent" 

난 그냥 표시되지 레이아웃을 추측하고있어?

+0

두 필드 모두 fill_parent를 시도했습니다. 불운. –

관련 문제