尝试在循环中动态地向滚动视图添加一些视图,但没有效果或任何类型的崩溃我在滚动视图内有 atablelyout 并在循环中添加表格行视图
///loops 运行 5 次
ScrollView parent = (ScrollView) root.getRootView()
.findViewById(R.id.scrolltbl);
View child = getLayoutInflater(
savedInstanceState).inflate(R.layout.attditem, null);
String lecs = findint(tds.text());// attdTile
String leves = findint(leaves.text());
String abs = findint(absents.text());
((TextView)child.findViewById(R.id.lecs))
.setText(lecs);
((TextView)child.findViewById(R.id.lvs))
.setText(leves);
((TextView)child.findViewById(R.id.abs))
.setText(abs);
((TextView)child.findViewById(R.id.crsname))
.setText(tTrs[f]);
Log.w("count","2d");
parent.addView(child);