如何从充气表中获取按钮的标签?到目前为止我有以下代码,现在当我按下按钮时如何从按钮中获取标签?
TableLayout table = (TableLayout)findViewById(R.id.scheduleTable);
for (int i = 0; i < jlen; i++) {
// Inflate
TableRow row = (TableRow)LayoutInflater.from(UpdateScheduleActivity.this).inflate(R.layout.schedulerow, null);
((TextView)row.findViewById(R.id.attr_day)).setText(json_schedule.getString(KEY_DOW));
((TextView)row.findViewById(R.id.attr_start)).setText(json_schedule.getString(KEY_START));
((TextView)row.findViewById(R.id.attr_stop)).setText(json_schedule.getString(KEY_STOP));
((Button)row.findViewById(R.id.btnRemove)).setTag(sid);
table.addView(row);
}
table.requestLayout();