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 <[email protected]> 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 [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