我有这个代码:
List<EditText> someList = new ArrayList<EditText>();
//Let's say we'd like to add 10 EditTexts
for(int i = 0; i < 10; i++){
EditText t1 = new EditText(); //The EditText you'd like to add to the list
t1.setText("lol"); //Give the EditText the value 'lol'
someList.add(t1); //Add the EditText to the list
}
//Go over the list and get the values
for(EditText t : someList){
String val = t.getText(); //Get the value for the temp EditText variable t
}
我想知道如何获取带有索引号的数组列表文本?喜欢:somelist[2]