开发者

Specify view to use when ListView is empty?

I can't find开发者_StackOverflow this in the docs - isn't there a way to specify a View to use for a ListView if the adapter is empty?

Thanks


You can use setEmptyView and tell the current ListView to display a specific View when the adapter is empty, like so

getListView().setEmptyView(findViewById(R.id.empty));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜