android listView的为空时显示

TextView tv=new TextView(this);  
tv.setText("学校");  
tv.setGravity(Gravity.CENTER);  
  
  
LayoutParams params = new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);  
addContentView(tv, params);  
pausList.setEmptyView(tv);  


你可能感兴趣的:(android,ListView)