我从数据库中获取菜单名称,然后附加到自定义列表视图编辑文本。现在我正在更改 edittext 中的一些值。我希望将 edittext 值更改的所有值放入数组中
Example :x,y,z menunames comes from database i append editext(Custom listview)
now i am changed y to b
now i want x,b,z in arraylist
我试试这个代码(基本适配器类)
public View getView(int position, View convertView, ViewGroup parent) {
final ViewHolder holder;
if (convertView == null) {
holder = new ViewHolder();
convertView = inflater.inflate(R.layout.editmainmenulist, null);
holder.caption = (EditText) convertView
.findViewById(R.id.editmaimenu);
holder.caption1=(ImageView) convertView.findViewById(R.id.menuimage);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
//Fill EditText with the value you have in data source
holder.caption.setText(itemnames[position]);
holder.caption.setId(position);
holder.caption1.setImageBitmap(bmps[position]);
arr.add(holder.caption.getText().toString());//here i get menunames data only not changed edittext values
return convertView;
}
}
class ViewHolder {
EditText caption;
ImageView caption1;
}
class ListItem {
String caption;
}
请帮我