ListView Empty显示文字

TextView nullTxtView=new TextView(this);
nullTxtView.setText("这里为空哈哈");
nullTxtView.setGravity(Gravity.CENTER);
listView.setEmptyView(nullTxtView);

LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
addContentView(nullTxtView, params);

posted @ 2011-07-01 15:59  Gang.Wang  阅读(540)  评论(0编辑  收藏  举报