@Override public void onDestroy() { if (!NetworkView.Instance().isInitialized() && NetworkInitializer.Instance != null) { NetworkInitializer.Instance.setActivity(null); } super.onDestroy(); }
@Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); addMenuItem(menu, MENU_SEARCH, "networkSearch", R.drawable.ic_menu_search); addMenuItem(menu, MENU_ADD_CATALOG, "addCustomCatalog", R.drawable.ic_menu_add); addMenuItem(menu, MENU_REFRESH, "refreshCatalogsList", R.drawable.ic_menu_refresh); addMenuItem(menu, MENU_LANGUAGE_FILTER, "languages", R.drawable.ic_menu_languages); return true; }
@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); requestWindowFeature(Window.FEATURE_NO_TITLE); setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); myIntent = getIntent(); }
@Override public void onResume() { super.onResume(); if (!NetworkView.Instance().isInitialized()) { if (NetworkInitializer.Instance == null) { new NetworkInitializer(this); NetworkInitializer.Instance.start(); } else { NetworkInitializer.Instance.setActivity(this); } } else { prepareView(); if (myIntent != null) { processIntent(myIntent); myIntent = null; } } }
@Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); processIntent(intent); }
@Override public boolean onPrepareOptionsMenu(Menu menu) { super.onPrepareOptionsMenu(menu); menu.findItem(MENU_SEARCH).setEnabled(!searchIsInProgress()); return true; }