开发者

Specify view to use when ListView is empty?

开发者 https://www.devze.com 2022-12-20 05:12 出处:网络
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?

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

精彩评论

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