当ListView Empty的时候显示提示语

TextView tv=new TextView(this);
tv.setText("未查询到结果");
tv.setGravity(Gravity.CENTER);
searchResultlistView.setEmptyView(tv);
LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
addContentView(tv, params);
posted @ 2011-06-29 19:49  ihou  阅读(668)  评论(0编辑  收藏  举报