をそれ自身を複製。どうすればそれを防ぐことができますか?値は、私は私はそれが<code>ListView</code>のすべての4行目に自分自身を複製<code>EditText</code>に値を入力毎row.Whenで<code>EditText</code>を有する<code>ListView</code>を有するすべての4行目に
public class ItemsAdapter extends ArrayAdapter<Items>{
Double Price;
Double Quantity;
String _Quantity;
private int resource;
private LayoutInflater inflater;
private Context context;
Items items;
public ItemsAdapter(Context ctx, int resourceId, List<Items> objects){
super(ctx, resourceId, objects);
resource = resourceId;
inflater = LayoutInflater.from(ctx);
context=ctx;
}
@Override
public View getView (int position, View convertView, ViewGroup parent) {
ItemViewHolder viewHolder;
items = getItem(position);
if (convertView == null) {
viewHolder=new ItemViewHolder();
convertView = (RelativeLayout) inflater.inflate(resource, null);
viewHolder.txtQuantity =(EditText)convertView.findViewById(R.id.txtQuantity);
viewHolder.lblItemsName=(TextView) convertView.findViewById(R.id.lblItemName);
viewHolder.lblPrice = (TextView) convertView.findViewById(R.id.lblPrice);
} else {
viewHolder = (ItemViewHolder) convertView.getTag();
}
viewHolder.lblItemsName.setText(items.getItemName());
viewHolder.lblPrice.setText(items.getPrice().toString());
return convertView;
}
public class ItemViewHolder {
public EditText txtQuantity ;
public TextView lblItemsName;
public TextView lblPrice;
}
}`
考えるための良い方法をそれを把握するが、それは問題を解決するためのdidnt –