Monday, 9 September 2013

Android - delete a row from list view on button click

Android - delete a row from list view on button click

i am creating an application in which data is got from a barcode scanner
which identifies from an id, and show detail from the database through a
web service. i am currently using custom list which has a text view and a
button, the data which i want to embed on the textview is displaying
correctly...
my question is how do i delete a particular row from the list on the
button click .
here is the custom adaptor code.
public class MyCustomAdapter extends ArrayAdapter<String>
{
public MyCustomAdapter(Context context, int textViewResourceId,
ArrayList<String> items)
{
super(context, textViewResourceId, items);
}
@Override
public View getView(int position, View convertView, ViewGroup
parent)
{
LayoutInflater inflater = FusionMain.this.getLayoutInflater();
View row = inflater.inflate(R.layout.list_row, parent, false);
return row;
}
} // end MyCustomAdapter
what other function should i be creating in custom adapter ? i am new in
android development.. if you need further more detail i can update the
question or the code. kindly respond

No comments:

Post a Comment