我想在 for 循环中用“String row”的变量填充我的“String [] collect”数组,但我不知道如何正确地做到这一点!当数组被填充时,我想将它显示为带有 textview 的字符串。
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
List<double[]> lokal = readCsv(getApplicationContext());
for (double[] sor : lokal) {
for (int i = 0; i < sor.length; i++) {
mean(sor);
String row = Double.toString(mean(sor));
String[] collect = new String[] { row };
}
}
getActionBar().setDisplayHomeAsUpEnabled(true);
TextView textView = new TextView(this);
textView.setTextSize(30);
textView.setText(collect);
setContentView(textView);
}