org.hdtourist.view
Class CiudadActivity

java.lang.Object
  extended by android.content.Context
      extended by android.content.ContextWrapper
          extended by android.view.ContextThemeWrapper
              extended by android.app.Activity
                  extended by android.support.v4.app.FragmentActivity
                      extended by android.support.v7.app.ActionBarActivity
                          extended by org.hdtourist.view.base.BaseActionBarActivity
                              extended by org.hdtourist.view.base.BaseMenuActionBarActivity
                                  extended by org.hdtourist.view.CiudadActivity
All Implemented Interfaces:
android.content.ComponentCallbacks, android.content.ComponentCallbacks2, android.support.v4.app.ActionBarDrawerToggle.DelegateProvider, android.support.v4.app.TaskStackBuilder.SupportParentable, android.view.KeyEvent.Callback, android.view.LayoutInflater.Factory, android.view.LayoutInflater.Factory2, android.view.View.OnCreateContextMenuListener, android.view.Window.Callback, IBaseVista

public class CiudadActivity
extends BaseMenuActionBarActivity

Activity para mostrar la información de la ciudad.


Field Summary
private  android.support.v4.widget.DrawerLayout drawerLayout
          The drawer layout.
private  android.widget.ListView drawerList
          The drawer list.
private  android.support.v4.app.ActionBarDrawerToggle drawerToggle
          The drawer toggle.
private  CiudadPresenter presenter
          La clase presenter que gestiona esta actividad.
private  android.view.MenuItem searchMenuItem
          La búsqueda menu item.
private  java.util.Stack<InformacionFragment> stakFragments
          Pila de fragments de información guardados a los que volver.
 
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
 
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, AUDIO_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAPTIONING_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_ROUTER_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
 
Fields inherited from interface android.content.ComponentCallbacks2
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
 
Constructor Summary
CiudadActivity()
           
 
Method Summary
 boolean getActionsMenu(android.view.MenuItem item)
          Gets the actions menu.
 boolean getActionsSubMenu(android.view.MenuItem item)
          Gets the actions sub menu.
 InformacionFragment getInformacionFragmentActual()
          Obtiene el fragment de información que se está mostrando en este momento.
 int getMenu()
          Gets the menu.
 android.view.MenuItem getSearchMenu()
          Obtiene el menú de búsqueda almacenado como atributo de la clase
 int getSubMenu()
          Gets the sub menu.
 android.support.v4.app.FragmentManager getSupportFragmentManager()
           
 boolean hayFragmentsEnLaPila()
          Indica si hay fragments en la pila.
 void onConfigurationChanged(android.content.res.Configuration newConfig)
           
protected  void onCreate(android.os.Bundle savedInstanceState)
           
 boolean onCreateOptionsMenu(android.view.Menu menu)
           
 boolean onKeyDown(int keyCode, android.view.KeyEvent event)
           
protected  void onPostCreate(android.os.Bundle savedInstanceState)
           
 boolean onPrepareOptionsMenu(android.view.Menu menu)
           
 void replaceFragment(InformacionFragment fragment, boolean guardarActual)
          Reemplaza el fragment de información que se muestra
private  void setNavigationDrawer()
          Fija el navigation drawer.
 void setSearchMenuItem(android.view.MenuItem searchMenuItem)
          Almacena el menú de búsqueda en un atributo de la clase
 void setTitle(java.lang.CharSequence title)
           
 
Methods inherited from class org.hdtourist.view.base.BaseMenuActionBarActivity
onOptionsItemSelected, showPopup
 
Methods inherited from class org.hdtourist.view.base.BaseActionBarActivity
createNotificationProgress, getDialogBarProgress, getDialogSpinerProgress, getNotificationProgress, manejaError, onResume, recreate
 
Methods inherited from class android.support.v7.app.ActionBarActivity
addContentView, getDrawerToggleDelegate, getMenuInflater, getSupportActionBar, getSupportParentActivityIntent, onBackPressed, onContentChanged, onCreatePanelMenu, onCreatePanelView, onCreateSupportNavigateUpTaskStack, onMenuItemSelected, onPostResume, onPrepareOptionsPanel, onPreparePanel, onPrepareSupportNavigateUpTaskStack, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, setContentView, setContentView, setContentView, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask
 
Methods inherited from class android.support.v4.app.FragmentActivity
dump, getLastCustomNonConfigurationInstance, getSupportFragmentManager, getSupportLoaderManager, onActivityResult, onAttachFragment, onCreateView, onDestroy, onLowMemory, onNewIntent, onPanelClosed, onPause, onResumeFragments, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onSaveInstanceState, onStart, startActivityForResult, startActivityFromFragment
 
Methods inherited from class android.app.Activity
closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getParent, getParentActivityIntent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isTaskRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onChildTitleChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateThumbnail, onCreateView, onDetachedFromWindow, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuOpened, onNavigateUp, onNavigateUpFromChild, onOptionsMenuClosed, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onProvideAssistData, onRestart, onRestoreInstanceState, onSearchRequested, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, reportFullyDrawn, requestWindowFeature, runOnUiThread, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitleColor, setVisible, setVolumeControlStream, shouldUpRecreateTask, showDialog, showDialog, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
 
Methods inherited from class android.view.ContextThemeWrapper
applyOverrideConfiguration, attachBaseContext, getResources, getTheme, setTheme
 
Methods inherited from class android.content.ContextWrapper
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
 
Methods inherited from class android.content.Context
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hdtourist.view.base.IBaseVista
manejaError
 

Field Detail

drawerLayout

private android.support.v4.widget.DrawerLayout drawerLayout
The drawer layout.


drawerList

private android.widget.ListView drawerList
The drawer list.


drawerToggle

private android.support.v4.app.ActionBarDrawerToggle drawerToggle
The drawer toggle.


presenter

private CiudadPresenter presenter
La clase presenter que gestiona esta actividad.


searchMenuItem

private android.view.MenuItem searchMenuItem
La búsqueda menu item.


stakFragments

private java.util.Stack<InformacionFragment> stakFragments
Pila de fragments de información guardados a los que volver.

Constructor Detail

CiudadActivity

public CiudadActivity()
Method Detail

getActionsMenu

public boolean getActionsMenu(android.view.MenuItem item)
Description copied from class: BaseMenuActionBarActivity
Gets the actions menu.

Specified by:
getActionsMenu in class BaseMenuActionBarActivity
Parameters:
item - the item
Returns:
the actions menu

getActionsSubMenu

public boolean getActionsSubMenu(android.view.MenuItem item)
Description copied from class: BaseMenuActionBarActivity
Gets the actions sub menu.

Overrides:
getActionsSubMenu in class BaseMenuActionBarActivity
Parameters:
item - the item
Returns:
the actions sub menu

getMenu

public int getMenu()
Description copied from class: BaseMenuActionBarActivity
Gets the menu.

Specified by:
getMenu in class BaseMenuActionBarActivity
Returns:
the menu

getSearchMenu

public android.view.MenuItem getSearchMenu()
Obtiene el menú de búsqueda almacenado como atributo de la clase

Returns:
the search menu

getSubMenu

public int getSubMenu()
Description copied from class: BaseMenuActionBarActivity
Gets the sub menu.

Specified by:
getSubMenu in class BaseMenuActionBarActivity
Returns:
the sub menu

hayFragmentsEnLaPila

public boolean hayFragmentsEnLaPila()
Indica si hay fragments en la pila.

Returns:
true, si hay fragments de información en la pila, es decir, si hay pantallas de información a las que volver

onConfigurationChanged

public void onConfigurationChanged(android.content.res.Configuration newConfig)
Specified by:
onConfigurationChanged in interface android.content.ComponentCallbacks
Overrides:
onConfigurationChanged in class android.support.v7.app.ActionBarActivity

onCreateOptionsMenu

public boolean onCreateOptionsMenu(android.view.Menu menu)
Overrides:
onCreateOptionsMenu in class BaseMenuActionBarActivity

onKeyDown

public boolean onKeyDown(int keyCode,
                         android.view.KeyEvent event)
Specified by:
onKeyDown in interface android.view.KeyEvent.Callback
Overrides:
onKeyDown in class android.support.v4.app.FragmentActivity

onPrepareOptionsMenu

public boolean onPrepareOptionsMenu(android.view.Menu menu)
Overrides:
onPrepareOptionsMenu in class android.app.Activity

replaceFragment

public void replaceFragment(InformacionFragment fragment,
                            boolean guardarActual)
Reemplaza el fragment de información que se muestra

Parameters:
fragment - el nuevo fragment
guardarActual - true si se debe guardar el fragment anterior en la pila para poder volver a el al pulsar el botón "atrás"

setTitle

public void setTitle(java.lang.CharSequence title)
Overrides:
setTitle in class android.app.Activity

setSearchMenuItem

public void setSearchMenuItem(android.view.MenuItem searchMenuItem)
Almacena el menú de búsqueda en un atributo de la clase

Parameters:
searchMenuItem - the searchMenuItem to set

getInformacionFragmentActual

public InformacionFragment getInformacionFragmentActual()
Obtiene el fragment de información que se está mostrando en este momento.

Returns:
el fragment de información que está visible

setNavigationDrawer

private void setNavigationDrawer()
Fija el navigation drawer.


onCreate

protected void onCreate(android.os.Bundle savedInstanceState)
Overrides:
onCreate in class BaseActionBarActivity

onPostCreate

protected void onPostCreate(android.os.Bundle savedInstanceState)
Overrides:
onPostCreate in class android.app.Activity

getSupportFragmentManager

public android.support.v4.app.FragmentManager getSupportFragmentManager()