private void openLatLonPicker() { mGalleryQueryParameter.mUseLatLon = true; final FragmentManager manager = getFragmentManager(); LocationMapFragment dirDialog = new LocationMapFragment(); dirDialog.defineNavigation( this.mGalleryQueryParameter.mFilter, this.mGalleryQueryParameter.mCurrentLatLon, FotoSql.QUERY_TYPE_GROUP_PLACE_MAP); dirDialog.show(manager, DLG_NAVIGATOR_TAG); }
@Override public boolean onPrepareOptionsMenu(Menu menu) { MenuItem sorter = menu.findItem(R.id.cmd_sort); if (sorter != null) { StringBuilder sortTitle = new StringBuilder(); sortTitle .append(getString(R.string.action_sort_title)) .append(": ") .append(mGalleryQueryParameter.getSortDisplayName(this)); sorter.setTitle(sortTitle.toString()); } return super.onPrepareOptionsMenu(menu); }
private void openFolderPicker() { mGalleryQueryParameter.mUseLatLon = false; int dirQueryID = this.mGalleryQueryParameter.getDirQueryID(); /** if wrong datatype was saved: gallery is not allowed for dirPicker */ if (FotoSql.QUERY_TYPE_GALLERY == dirQueryID) { dirQueryID = FotoSql.QUERY_TYPE_GROUP_ALBUM; } if (mDirectoryRoot == null) { // not loaded yet. load directoryRoot in background final QueryParameterParcelable currentDirContentQuery = new QueryParameterParcelable(FotoSql.getQuery(dirQueryID)); FotoSql.setWhereFilter(currentDirContentQuery, this.mGalleryQueryParameter.mFilter); this.mGalleryQueryParameter.mDirQueryID = (currentDirContentQuery != null) ? currentDirContentQuery.getID() : FotoSql.QUERY_TYPE_UNDEFINED; if (currentDirContentQuery != null) { this.mMustShowNavigator = true; DirectoryLoaderTask loader = new DirectoryLoaderTask(this, debugPrefix) { @Override protected void onPostExecute(IDirectory directoryRoot) { onDirectoryDataLoadComplete(directoryRoot); } }; loader.execute(currentDirContentQuery); } else { Log.e( Global.LOG_CONTEXT, debugPrefix + " this.mDirQueryID undefined " + this.mGalleryQueryParameter.mDirQueryID); } } else { this.mMustShowNavigator = false; final FragmentManager manager = getFragmentManager(); DirectoryPickerFragment dirDialog = new DirectoryPickerFragment(); // (DirectoryPickerFragment) // manager.findFragmentByTag(DLG_NAVIGATOR_TAG); dirDialog.defineDirectoryNavigation( mDirectoryRoot, dirQueryID, this.mGalleryQueryParameter.mCurrentPath); dirDialog.show(manager, DLG_NAVIGATOR_TAG); } }