@Override
  public Loader<Cursor> onCreateLoader(int id, Bundle args) {

    // TODO

    MovieSelection selection = new MovieSelection();
    selection.isFavorite(mIsFavorite);

    if (id == SortItems.TITLE.getPosition()) {
      selection.orderByTitle();
    } else if (id == SortItems.POPULARITY.getPosition()) {
      selection.orderByPopularity(true);
    } else if (id == SortItems.HIGHEST_RATED.getPosition()) {
      selection.orderByVoteAverage(true);
    } else if (id == SortItems.LOWES_RATED.getPosition()) {
      selection.orderByVoteAverage();
    }

    mSortBy = id;

    return new CursorLoader(
        U.getCTX(), // Parent activity context
        MovieColumns.CONTENT_URI, // Table to query
        MovieColumns.ALL_COLUMNS, // Projection to return
        selection.sel(), // No selection clause
        selection.args(), // No selection arguments
        selection.order() // Default sort order
        );
  }
/** Created by Yhdista on 23.8.2015. */
public class ConstFragments {

  private static final Resources RES = U.getCTX().getResources();

  // fragments
  public static final String TAG_FRAGMENT_PROGRESS_DIALOG = "activityProgressDialog";
  public static final String TAG_FRAGMENT_ASYNC_TASK = "fragmentAsyncTask";
  public static final String TAG_FRAGMENT_MAIN = RES.getString(R.string.fragment_main);
  public static final String TAG_FRAGMENT_DETAIL = RES.getString(R.string.fragment_detail);
  public static final String TAG_FRAGMENT_SETTING_DIALOG = "fragmentSettingDialog";
}