您的位置:首页 > 其它

ListView.setEmptyView不起作用

2015-11-05 16:57 253 查看
可能的原因:1. 修改布局文件,使得ListView和EmptyView是兄弟的关系,在一个parent布局的下面。

例如:

<FrameLayout

        android:layout_width="match_parent"

        android:layout_height="0dip"

        android:layout_weight="1" >

    <ListView

            android:id="@+id/list_view"

            android:layout_width="match_parent"

            android:layout_height="match_parent"/>

    <ImageView

            android:id="@android:id/empty"

            android:layout_width="match_parent"

            android:layout_height="match_parent"

            android:src="#88000000"

            android:visibility="gone"/>

</FrameLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  listview setEmptyView