为了在表格布局中添加一行,代码可以如下完成:
private void ToDisplayTagGUI(String Slot, int index)
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View newTagView = inflater.inflate(R.layout.new_tag_view, null);
SlotTableLayout.addView(newTagView, index);
删除整个tablelayout的数据,代码如下:
SlotTableLayout.removeAllViews();
如果我只想从表格布局中删除其中一行,我该怎么做?