I am setting up this loop and it works fine, but I would like to be able to modify each textView separately
OK
so I need to configure textView.setId (anyway);
No, no, there are better ways to achieve what you are trying to do.
One example might be something like this:
LayoutInflator mInflator;
mInflator = LayoutInflater.from(this);
TextView[] mTxts = new TextView[5](this);
while (counter < 5) {
mTxts[counter] = (TextView)mInflator.inflate(R.layout.newplayerlayout, null);
parent.addView(view);
mTxts[counter].setText("Player "+counter);
counter++;
}
mTxts[0].setText("plums");
mTxts[2].setText("grapes");
, , . "this", "YourActivity.this" .
, LayoutInflater, , 4 . , , , . TextView , . , , findViewById(), , .