Hi,

i tried with requery the Cursor. But my list is empty after the
requery, seems i do something wrong there. So is there any Info/Rules
available how to requery have to be used ?

Thx,
Jens

On 5 Jan., 17:13, Beth <emez...@gmail.com> wrote:
> Hmmm - not sure you want to call this method more than once.
>                 setListAdapter(shows);
>
> Set the adapter once, when you create the list.  Requery the list's
> cursor as needed.  If you use a cursor adapter you may never have to
> requery manually.
>
> Good luck!
>
> On Jan 5, 7:42 am, mac-systems <jens.h...@gmx.de> wrote:
>
> > I just figured out that if i write the setActive Method like this i
> > see a update, but i have duplicated Code:
>
> >         private void setActive(final boolean _state)
> >         {
> >                 final ISelectedDAO dao = DAOFactory.getSelectedDAO(this);
> >                 dao.setActiv(getSelectedItemId(), _state);
> >                 c = dao.fetchAll();
> >                 startManagingCursor(c);
>
> >                 final String[] from = new String[]
> >                 { ISelectedDAO.COLUMN_ACTIV, ISelectedDAO.COLUMN_NAME,
> > ISelectedDAO.COLUMN_ID, ISelectedDAO.COLUMN_STARTING,
> >                                 ISelectedDAO.COLUMN_TILL };
> >                 final int[] to = new int[]
> >                 { R.id.custom_spotoverview_activ, 
> > R.id.custom_spotoverview_name,
> > R.id.custom_spotoverview_detail,
> >                                 R.id.custom_spotoverview_wind_from,
> > R.id.custom_spotoverview_wind_to };
> >                 shows = new SimpleCursorAdapter(this,
> > R.layout.custom_listview_spotoverview, c, from, to);
> >                 shows.setViewBinder(new SpotOverviewViewBinder());
> >                 setListAdapter(shows);
> >                 Log.d(LOG_TAG, "Updating View");
> >         }
-- 
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