我正在制作一个显示新闻的应用程序。如果我不想显示“news_item1”,如何将其从列表中删除?有没有办法为“news_item1”设置不可见?
public View getView(int position, View convertView, ViewGroup parent) {
// Log.e("www", "getView " + position);
v = convertView;
if (v == null) {
int res = 0;
if (mItems.get(position).iType == 0)
res = R.layout.news_item;
else
res = R.layout.news_item1;
v = inflater.inflate(res, parent, false);
}