Hi All,

I am using following adapter class when I am calling
notifyDataInvalidate and then notifyDataSetChanged, it is not updating
listview.

strangely I have two instance of this adapter, in one of them list is
getting updated.

public class CalendarEventAdapter  extends SimpleAdapter {
        List<HashMap<String, String>> mDataList;
        int mResource;
        Context mCtx;

        @SuppressWarnings("unchecked")
        public CalendarEventAdapter(Context context,
                        List<? extends Map<String, ?>> data, int resource,
                        String[] from, int[] to) {
                super(context, data, resource, from, to);
                mDataList = (List<HashMap<String, String>>) data;
                mResource = resource;
                mCtx = context;
        }

        @Override
        public int getCount() {
                return super.getCount();
        }

        @Override
        public void notifyDataSetChanged() {
                // TODO Auto-generated method stub
                super.notifyDataSetChanged();
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent)
{
                if (convertView == null) {
                        convertView = View.inflate(mCtx, mResource, null);
                }

                if (type.equalsIgnoreCase("Statement")) {


                        return convertView;
                } else {

                        return super.getView(position, convertView, parent);
                }
        }
}

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

Reply via email to