Search in sources :

Example 1 with ThrottledContentObserver

use of com.google.samples.apps.iosched.util.ThrottledContentObserver in project iosched by google.

the class ExploreIOFragment method onAttach.

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    // Register preference change listeners
    ConfMessageCardUtils.registerPreferencesChangeListener(getContext(), mConfMessagesAnswerChangeListener);
    SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(getContext());
    sp.registerOnSharedPreferenceChangeListener(mSettingsChangeListener);
    // Register content observers
    mSessionsObserver = new ThrottledContentObserver(new ThrottledContentObserver.Callbacks() {

        @Override
        public void onThrottledContentObserverFired() {
            fireReloadEvent();
            fireReloadTagsEvent();
        }
    });
    mTagsObserver = new ThrottledContentObserver(new ThrottledContentObserver.Callbacks() {

        @Override
        public void onThrottledContentObserverFired() {
            fireReloadTagsEvent();
        }
    });
}
Also used : SharedPreferences(android.content.SharedPreferences) ThrottledContentObserver(com.google.samples.apps.iosched.util.ThrottledContentObserver)

Aggregations

SharedPreferences (android.content.SharedPreferences)1 ThrottledContentObserver (com.google.samples.apps.iosched.util.ThrottledContentObserver)1