I have a some problem regarding inflating and re-using the same TextView.
Its like its trying to overwrite the same textview over and over again or something and it can
In my case, setTag(i) didn't work, what worked was changing the id after inflating the layout but before adding it to the parent view like this:
LayoutInflater inflater = LayoutInflater.from(this);
View mainlayout = inflater.inflate(R.layout.days_monday_inflate, null);
View layout_number = inflater.inflate(R.layout.inflate_number, null);
for (int i = 0; i < 10; i++) {
row = new TableRow(this);
number = (TextView) layout_number.findViewById(R.id.Number);
number.setId(i); //THIS IS THE KEY STEP
number.setText(Integer.toString(i));
row.addView(number);
}
setContentView(mainlayout);