Yes Nadeem, good idea ;-)

Then my adapter inherits from ResourceCursorAdapter and redifying
NewView method as:

                        LayoutInflater li = (LayoutInflater)
getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                        return li.inflate(R.layout.listchargelayoutitem, 
parent, false);

In the BindView method I load my image in layout by this way:

                        if
(cursor.getInt(cursor.getColumnIndex("fk_reccurent")) ==
DatabaseWrapper.NO_RECCURENCY) {
                                ImageView tvRecurent = (ImageView)
view.findViewById(R.id.isrecurentimg);
                                tvRecurent.setVisibility(View.INVISIBLE);
                        }

Where ViewId named "isrecurentimg" is a part of my item's layout
define in "listchargelayoutitem.xml". This layout implements an
RelativeLayout with some Views inside where the image look like that:

        <ImageView android:id="@+id/isrecurentimg"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toLeftOf="@+id/spacer"
                android:src="@drawable/recurent"
                android:layout_centerInParent="true"/>

My adapter is refresh in an Update method wich is called in OnCreate,
OnResume method (inherits from Activity) or for some actions realized
by user on items.
Adapter is set in this way:

                ListView list = (ListView)
findViewById(R.id.listofcharges);
                list.setVerticalScrollBarEnabled(true);

                // On crée l'adapter pour la gestion des items de la liste
                adapter = new MyAdapter(this, cur);
                list.setAdapter(adapter);

My picture are displayed well but when the list is filled with a lot
of items, scroll bar appears. When I scroll on this list, the pictures
disapear.
I hope this will helpful to understand my issue.

Thanks for help.
Antony.

-- 
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