Re: [android-developers] how to implement edittext inside listview
Hi. please clear the question. i am implement listview and each view *(or row).* having editlist box. problem when i trying to get data from all editboxes its takes only first screen view.(*means getting the value from the first row only ie index=0*) here show only 5 views. when scrolling* g=i* get the problem. please help me? ::: when clicking the ok button we get the value of edittext in all rows ... public void onClick(View view) { for(int i=0;ieditTextList.size();i++) { String q=editTextList.get(i).getText().toString(); Toast.makeText(CustomListViewDemo.this, Value - + q, Toast.LENGTH_SHORT).show(); Log.v( indela,indela); } } }); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to implement edittext inside listview
in each row...its take the values from how many rows display in a screen at app launched only. and remaining below screen its nit getting the values from edittext box. On Wed, Sep 21, 2011 at 4:50 PM, Ratheesh Valamchuzhy android...@gmail.comwrote: Hi. please clear the question. i am implement listview and each view *(or row).* having editlist box. problem when i trying to get data from all editboxes its takes only first screen view.(*means getting the value from the first row only ie index=0* ) here show only 5 views. when scrolling* g=i* get the problem. please help me? ::: when clicking the ok button we get the value of edittext in all rows ... public void onClick(View view) { for(int i=0;ieditTextList.size();i++) { String q=editTextList.get(i).getText().toString(); Toast.makeText(CustomListViewDemo.this, Value - + q, Toast.LENGTH_SHORT).show(); Log.v( indela,indela); } } }); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to implement edittext inside listview
Hi As per your code there is 5 tedittext in you app .. we can get the values of each edittext(5 nos) in that pgm... see the code ... === public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.adaptor_content, null); holder = new ViewHolder(); holder.textLine = (TextView) convertView.findViewById(R.id.textLine); holder.textLine2 =(TextView) convertView.findViewById(R.id.textLine2); holder.Edittext = (EditText) convertView.findViewById(R.id.edittext_qty); editTextList.add(holder.Edittext); convertView.setOnClickListener(new OnClickListener() { private int pos = position; @Override public void onClick(View v) { String q=editTextList.get(position).getText().toString(); Toast.makeText(context, data-+ q, Toast.LENGTH_SHORT).show(); } }); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.textLine.setText(TitleString[position] + String.valueOf(position)); holder.textLine2.setText(DetailString[position] + String.valueOf(position)); return convertView; } = -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to implement edittext inside listview
ya but increase the more no. of rows then it is not getting the data from edittext. the means increase up to to 12 row, On Wed, Sep 21, 2011 at 6:13 PM, Ratheesh Valamchuzhy android...@gmail.comwrote: Hi As per your code there is 5 tedittext in you app .. we can get the values of each edittext(5 nos) in that pgm... see the code ... === public View getView(final int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = mInflater.inflate(R.layout.adaptor_content, null); holder = new ViewHolder(); holder.textLine = (TextView) convertView.findViewById(R.id.textLine); holder.textLine2 =(TextView) convertView.findViewById(R.id.textLine2); holder.Edittext = (EditText) convertView.findViewById(R.id.edittext_qty); editTextList.add(holder.Edittext); convertView.setOnClickListener(new OnClickListener() { private int pos = position; @Override public void onClick(View v) { String q=editTextList.get(position).getText().toString(); Toast.makeText(context, data-+ q, Toast.LENGTH_SHORT).show(); } }); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } holder.textLine.setText(TitleString[position] + String.valueOf(position)); holder.textLine2.setText(DetailString[position] + String.valueOf(position)); return convertView; } = -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to implement edittext inside listview
Are you dynamically increasing the rows or specifying it static in the code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to implement edittext inside listview
specifying the static in the code On Wed, Sep 21, 2011 at 6:36 PM, Ratheesh Valamchuzhy android...@gmail.comwrote: Are you dynamically increasing the rows or specifying it static in the code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en