> i want to remove the first line from my ListView. I use the
> http://www.androidguys.com/2008/07/22/fancy-listviews-part-three/
> example from Mark Murphy.

I've heard of that guy.

> I have a ImageView and two TextViews in one List-row.
>
> My adapter class:
> class MyAdapter extends ArrayAdapter<String>
> {
>       Activity context;
>
>       MyAdapter(Activity context)
>       {
>               super(context, R.layout.row, description);  //description is a
> list of Strings and is showed in one TextView. The image and the other
> TextView depends on other objects.
>               this.context=context;
>       }
>
> I try:
>
> String delete = (((MyAdapter)lv.getAdapter()).getItem(0));
> my_adapter.remove(delete);
> lv.setAdapter(my_adapter);
>

You do not need to call setAdapter() again on the ListView. ArrayAdapter
will already remove the row from the ListView without setAdapter() being
called again.

> But it only remove the description

Of course. Your list is a list of descriptions. You deleted a description.
Hence, it will remove the description for the list.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to