List of usage examples for android.support.v4.content Loader onContentChanged
public void onContentChanged()
From source file:can.yrt.onebusaway.MySearchRoutesFragment.java
@Override protected void doSearch(String text) { UIHelp.showProgress(this, true); Bundle args = new Bundle(); args.putString(QUERY_TEXT, text);/*from w ww . j av a2 s.c om*/ Loader<?> loader = getLoaderManager().restartLoader(0, args, this); loader.onContentChanged(); }
From source file:org.onebusaway.android.ui.MySearchRoutesFragment.java
@Override protected void doSearch(String text) { UIUtils.showProgress(this, true); Bundle args = new Bundle(); args.putString(QUERY_TEXT, text);//from w w w . j a v a 2 s .c o m Loader<?> loader = getLoaderManager().restartLoader(0, args, this); loader.onContentChanged(); }
From source file:com.xixicm.de.infrastructure.loader.AsyncTaskSentenceLoadExecutor.java
public void loadSentences(boolean isFirstLoad, boolean favorite, UseCase.UseCaseCallback<List<? extends Sentence>, Void> callback) { mCaseCallback = callback;//from ww w . j ava 2 s . co m Loader loader = mLoaderManager.getLoader(SENTENCES_QUERY); if (isFirstLoad || loader == null) { Bundle args = new Bundle(); args.putBoolean(IS_FAVORITE, favorite); mLoaderManager.initLoader(SENTENCES_QUERY, args, this); } else { loader.onContentChanged(); } }
From source file:com.gh4a.activities.ReleaseInfoActivity.java
@Override public void onRefresh() { Loader loader = getSupportLoaderManager().getLoader(0); if (loader != null) { mRelease = null;//from ww w . j av a 2 s . c o m setContentShown(false); loader.onContentChanged(); getSupportLoaderManager().destroyLoader(1); } super.onRefresh(); }
From source file:com.gh4a.activities.SearchActivity.java
@Override public void onRefresh() { Loader loader = getSupportLoaderManager().getLoader(0); if (loader != null) { if (mAdapter != null) { mAdapter.clear();//from ww w . jav a 2s. co m } loader.onContentChanged(); } super.onRefresh(); }
From source file:de.grobox.liberario.ui.LocationView.java
private void onContentChanged() { ui.progress.setVisibility(View.VISIBLE); Loader loader = loaderManager.getLoader(getId()); if (loader != null) loader.onContentChanged(); }
From source file:info.schnatterer.nusic.android.activities.MainActivity.java
@Override public void onContentChanged() { super.onContentChanged(); final ViewPager pager = (ViewPager) findViewById(R.id.mainPager); final TabFragmentPagerAdapter adapter = (TabFragmentPagerAdapter) pager.getAdapter(); if (adapter != null) { runOnUiThread(new Runnable() { public void run() { for (TabDefinition tabDefinition : TabDefinition.values()) { Loader<Object> loader = getSupportLoaderManager().getLoader(tabDefinition.loaderId); if (loader != null) { loader.onContentChanged(); }/*from w w w.ja v a2 s.co m*/ } } }); } }
From source file:de.grobox.liberario.ui.LocationView.java
@Override public void onRestoreInstanceState(Parcelable state) { if (state instanceof Bundle) { // implicit null check Bundle bundle = (Bundle) state;//from w ww . j a va 2 s . c o m Location loc = (Location) bundle.getSerializable(LOCATION); String text = bundle.getString(TEXT); if (loc != null) { setLocation(loc); } else if (text != null && text.length() > 0) { ui.location.setText(text); ui.clear.setVisibility(View.VISIBLE); // load the auto-completion results again as they seem to get lost during restart Loader loader = loaderManager.getLoader(getId()); if (loader != null) loader.onContentChanged(); } int position = bundle.getInt(TEXT_POSITION); ui.location.setSelection(position); changingHome = bundle.getBoolean(CHANGING_HOME); if (changingHome) { // re-set OnHomeChangedListener if home picker is shown Fragment homePicker = activity.getSupportFragmentManager() .findFragmentByTag(HomePickerDialogFragment.TAG); if (homePicker != null && homePicker.isAdded()) { ((HomePickerDialogFragment) homePicker).setOnHomeChangedListener(this); } } // replace state by super state state = bundle.getParcelable(SUPER_STATE); } super.onRestoreInstanceState(state); }
From source file:com.gh4a.activities.DiffViewerActivity.java
@Override public void onRefresh() { Loader loader = getSupportLoaderManager().getLoader(0); if (loader != null) { mCommitCommentsByPos.clear();//from ww w .java 2 s . c om setContentShown(false); loader.onContentChanged(); } super.onRefresh(); }
From source file:com.gh4a.activities.IssueActivity.java
@Override public void onCommentSent() { //reload comments Loader loader = getSupportLoaderManager().getLoader(2); if (loader != null) { loader.onContentChanged(); }/*from www .j a v a 2s . c om*/ setResult(RESULT_OK); }