2011-03-11 86 views

回答

1

取下适配器和呼叫项目notifyDataSetChanged()。它应该刷新你的列表视图的内容。

+0

可否请您发布代码 – 2011-03-11 06:30:28

+1

明白了.....谢谢 – 2011-03-11 06:40:47

0
public View getView(int position, View convertView, ViewGroup parent) { 

      final TableRow row = this.rows.get(position); 
ImageButton imgButton = (ImageButton) itemView.findViewById(R.id.icon); 
     imgButton.setTag(row); 




@Override 
    public void onClick(View v) { 
     ImageButton button = (ImageButton) v; 
     TableRow row = (TableRow) button.getTag(); 

     tableRowAdapter.deleteRow(row); 
     tableRowAdapter.notifyDataSetChanged(); 

    } 
+0

只是一个想法不完整的代码。 – 2011-03-11 10:08:44

相关问题