List of usage examples for android.database DataSetObserver onChanged
public void onChanged()
From source file:com.entertailion.android.slideshow.images.ImageManager.java
/** * Called when something changes in our data set. Cleans up any weak * references that are no longer valid along the way. *//*from ww w .j a v a2 s .c o m*/ public void notifyObservers() { Log.d(LOG_TAG, "notifyObservers: " + loading); if (loading) { final ArrayList<WeakReference<DataSetObserver>> observers = dataSetObservers; final int count = observers.size(); for (int i = count - 1; i >= 0; i--) { final WeakReference<DataSetObserver> weak = observers.get(i); final DataSetObserver obs = weak.get(); if (obs != null) { obs.onChanged(); } else { observers.remove(i); } } } }
From source file:com.doublesunflower.android.lockcast.ImageManager.java
/** * Called when something changes in our data set. Cleans up any weak references that * are no longer valid along the way.// w w w. ja va 2 s. c o m */ private void notifyObservers() { final ArrayList<WeakReference<DataSetObserver>> observers = mObservers; final int count = observers.size(); for (int i = count - 1; i >= 0; i--) { WeakReference<DataSetObserver> weak = observers.get(i); DataSetObserver obs = weak.get(); if (obs != null) { obs.onChanged(); } else { observers.remove(i); } } }
From source file:org.rssin.android.NavigationDrawerAdapter.java
public void updateMenu(Context context) throws IOException { menuItems.clear();/*from w ww. ja v a 2 s. c o m*/ menuItems.add(new MenuSection(context.getString(R.string.navigation_drawer_start), "")); menuItems.add(new MenuUnifiedInbox(context)); menuItems.add(new ManageFiltersSection(context.getString(R.string.navigation_drawer_edit_filters), context.getString(R.string.navigation_drawer_edit_text))); for (Filter f : FiltersList.getInstance(context).getFilters()) { menuItems.add(new MenuFilterItem(f)); } menuItems.add(new ManageFeedsSection(context.getString(R.string.navigation_drawer_edit_feeds), context.getString(R.string.navigation_drawer_edit_text))); for (Feed f : FeedsList.getInstance(context).getFeeds()) { menuItems.add(new MenuFeedItem(f)); } for (DataSetObserver observer : observers) { observer.onChanged(); } }
From source file:at.the.gogo.panoramio.panoviewer.ImageManager.java
/** * Called when something changes in our data set. Cleans up any weak * references that are no longer valid along the way. *///from w ww. j a v a 2 s.c o m private void notifyObservers() { final ArrayList<WeakReference<DataSetObserver>> observers = mObservers; final int count = observers.size(); for (int i = count - 1; i >= 0; i--) { final WeakReference<DataSetObserver> weak = observers.get(i); final DataSetObserver obs = weak.get(); if (obs != null) { obs.onChanged(); } else { observers.remove(i); } } }
From source file:com.partytv.server.ImageManager.java
/** * Called when something changes in our data set. Cleans up any weak * references that are no longer valid along the way. *//*www. ja v a 2 s .c o m*/ private void notifyObservers() { final ArrayList<WeakReference<DataSetObserver>> observers = mObservers; final int count = observers.size(); for (int i = count - 1; i >= 0; i--) { final WeakReference<DataSetObserver> weak = observers.get(i); final DataSetObserver obs = weak.get(); if (obs != null) { obs.onChanged(); } else { observers.remove(i); } } }