我得到了我的充气机来显示我想要的行数。我无法将文本插入到充气机内的每个文本视图中。它只填充了第一个 TextView 并将其余部分留空。我尝试使用数组但不断收到运行时错误
for (int i = 1; i <= numberOfGuests; ++i) {
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.row_per_person, table);
float numberInsertedForPerson = (float) (Math.round(tipPerPersons * 100.0) / 100.0);
String sTipPerPerson = Float.toString(numberInsertedForPerson);
tipPerPerson = (TextView) findViewById(R.id.tipPerPerson);
tipPerPerson.setText(sTipPerPerson);
}