2011-03-11 155 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

相關問題