2014-02-14 3 views
0

ListView 및 진행률 표시 줄이 있습니다. id를 @+id/android:empty으로 지정하면 목록이 채워지는 동안 진행률 막대가 제거됩니다. 그러나, 인구가 있은 후에도 여전히 존재합니다. 제거되지 않는 이유가 있습니까? 아니면 emptyListView을 프로그래밍 방식으로 지정해야합니까?빈 목록 진행률 표시 줄이 사라지지 않습니다.

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:gravity="center" 
    android:orientation="vertical" >  

    <ListView 
    android:id="@+id/list" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"/> 

    <ProgressBar 
    android:id="@+id/android:empty" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:indeterminate="true"/> 
</FrameLayout> 

답변

2

이 있어야한다 :

<ProgressBar 
android:id="@android:id/empty" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:indeterminate="true"/> 

+0

@id/android:empty입니다 (id 속성 봐). 나는 그것을 프로그래밍 방식으로하고 작동한다. 나는 그것에 충실 할 것 같다. – ono

0

이되지 @+id/android:empty

<ProgressBar 
    android:id="@id/android:empty" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:indeterminate="true"/> 
관련 문제