我正在动态创建EditText,我必须在“IMPORTO_FATTURA”SQLite 表的列中输入值。但是对于每个值都必须创建一个新记录....我该怎么办?这是到目前为止创建的代码。
ContentValues cv = new ContentValues();
cv.put(FattureTable.NOME_FORNITORE, spinnerFornitori.getSelectedItem().toString());
if(lineare instanceof ViewGroup) {
for(int i=0; i<((ViewGroup)lineare).getChildCount(); i++) {
View nextChild = ((ViewGroup)lineare).getChildAt(i);
if(nextChild instanceof LinearLayout) {
View child = ((LinearLayout)nextChild).getChildAt(0);
if(child instanceof EditText) {
EditText et = (EditText)child;
String value = et.getText().toString();
cv.put(FattureTable.IMPORTO_FATTURA, value);
}
}
}
}
cv.put(FattureTable.IMPORTO_FATTURA, Importo.getText().toString());
....
....