/** called by Fragment: a fragment Item was clicked */ @Override public void onGalleryImageClick(long imageId, Uri imageUri, int position) { Global.debugMemory(debugPrefix, "onGalleryImageClick"); QueryParameterParcelable imageDetailQuery = this.mGalleryQueryParameter.calculateEffectiveGalleryContentQuery(); ImageDetailActivityViewPager.showActivity(this, imageUri, position, imageDetailQuery); }
@Override protected void onCreate(Bundle savedInstanceState) { Global.debugMemory(mDebugPrefix, "onCreate"); super.onCreate(savedInstanceState); final Intent intent = getIntent(); if (Global.debugEnabled && (intent != null)) { Log.d( Global.LOG_CONTEXT, mDebugPrefix + "onCreate " + intent.toUri(Intent.URI_INTENT_SCHEME)); } setContentView(R.layout.activity_gallery_filter); this.mFilterValue = new FilterValue(); onCreateButtos(); GalleryFilterParameter filter = (savedInstanceState == null) ? getFilter(this.getIntent()) : GalleryFilterParameter.parse( savedInstanceState.getString(FILTER_VALUE, ""), new GalleryFilterParameter()); if (filter != null) { mFilter = filter; toGui(mFilter); mFilterValue.showLatLon(filter.isNonGeoOnly()); } bookmarkController = new BookmarkController(this); }
@Override protected void onCreate(Bundle savedInstanceState) { Global.debugMemory(debugPrefix, "onCreate"); super.onCreate(savedInstanceState); setContentView(R.layout.activity_gallery); // .gallery_activity); this.mGalleryQueryParameter.loadSettingsAndInstanceState(this, savedInstanceState); FragmentManager fragmentManager = getFragmentManager(); mGalleryGui = (Queryable) fragmentManager.findFragmentById(R.id.galleryCursor); // on tablet seperate dir navigator fragment mDirGui = (DirectoryGui) fragmentManager.findFragmentById(R.id.directoryFragment); if (FotoViewerParameter.galleryHasEmbeddedDirPicker) { if (mDirGui == null) { // on small screen/cellphone DirectoryGui is part of gallery mDirGui = (DirectoryGui) fragmentManager.findFragmentById(R.id.galleryCursor); } else { mHasEmbeddedDirPicker = true; } } else { if (mDirGui != null) { fragmentManager.beginTransaction().remove((Fragment) mDirGui).commit(); mDirGui = null; } } setTitle(); reloadGui(); }
@Override protected void onDestroy() { Global.debugMemory(debugPrefix, "onDestroy start"); super.onDestroy(); // to avoid memory leaks GarbageCollector.freeMemory(findViewById(R.id.root_view)); this.mGalleryQueryParameter.mGalleryContentQuery = null; mGalleryGui = null; mDirGui = null; invalidateDirectories(); System.gc(); Global.debugMemory(debugPrefix, "onDestroy end"); // RefWatcher refWatcher = AndroFotoFinderApp.getRefWatcher(this); // refWatcher.watch(this); }
@Override protected void onDestroy() { Global.debugMemory(mDebugPrefix, "onDestroy start"); super.onDestroy(); if (dirInfos != null) { for (Integer id : dirInfos.keySet()) { DirInfo dir = dirInfos.get(id); if (dir.directoryRoot != null) { dir.directoryRoot.destroy(); } } dirInfos = null; } System.gc(); Global.debugMemory(mDebugPrefix, "onDestroy end"); // RefWatcher refWatcher = AndroFotoFinderApp.getRefWatcher(this); // refWatcher.watch(this); }
private void onDirectoryDataLoadComplete(IDirectory directoryRoot, int queryId) { if (directoryRoot != null) { Global.debugMemory(mDebugPrefix, "onDirectoryDataLoadComplete"); DirInfo dirInfo = getOrCreateDirInfo(queryId); dirInfo.directoryRoot = directoryRoot; final FragmentManager manager = getFragmentManager(); DirectoryPickerFragment dirDialog = new DirectoryPickerFragment(); dirDialog.setContextMenuId(R.menu.menu_context_dirpicker); dirDialog.defineDirectoryNavigation( dirInfo.directoryRoot, dirInfo.queryId, dirInfo.currentPath); dirDialog.show(manager, DLG_NAVIGATOR_TAG); } }
private void onDirectoryDataLoadComplete(IDirectory directoryRoot) { if (directoryRoot == null) { final String message = getString( R.string.err_load_folder_failed, FotoSql.getName(this, this.mGalleryQueryParameter.getDirQueryID())); Toast.makeText(this, message, Toast.LENGTH_LONG).show(); } else { mDirectoryRoot = directoryRoot; if ((mDirGui != null) && (this.mGalleryQueryParameter.mCurrentPath != null)) { mDirGui.defineDirectoryNavigation( directoryRoot, this.mGalleryQueryParameter.getDirQueryID(), this.mGalleryQueryParameter.mCurrentPath); } Global.debugMemory(debugPrefix, "onDirectoryDataLoadComplete"); if ((mDirectoryRoot != null) && (this.mMustShowNavigator)) { openFolderPicker(); } } }
@Override protected void onResume() { Global.debugMemory(mDebugPrefix, "onResume"); loadLastFilter(); super.onResume(); }
@Override protected void onPause() { Global.debugMemory(mDebugPrefix, "onPause"); saveLastFilter(); super.onPause(); }
@Override protected void onResume() { Global.debugMemory(debugPrefix, "onResume"); super.onResume(); }
@Override protected void onPause() { Global.debugMemory(debugPrefix, "onPause"); this.mGalleryQueryParameter.saveSettings(this); super.onPause(); }