PresenterFunctions.MainFunctions

com.uva.rafael.tfg_goniometer.interfaces

## Interface PresenterFunctions.MainFunctions

- All Known Implementing Classes:
    MainPresenter
  Enclosing interface:
    PresenterFunctions

      public static interface PresenterFunctions.MainFunctions

  Interfaz correspondiente al Presentador `MainPresenter`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onBackPressed()` Called when the activity (`MainActivity`) has detected the user's press of the back key.
    `void` | `onCreateOptionsMenu(android.view.Menu menu)` Initialize the contents of the Activity's standard options menu.
    `boolean` | `onOptionsItemSelected(android.view.MenuItem item)` This hook is called whenever an item in your options menu is selected.
    `void` | `onPrepareOptionsMenu(android.view.Menu menu)` Prepare the Screen's standard options menu to be displayed
    `void` | `setNavigationItem(int code)` Metodo que se emplea para marcar como seleccionado uno de los distintos items en el `NavigationView`.
    `void` | `setNavigationItemSelectedListener(android.support.design.widget.NavigationView navigationView, android.support.v4.widget.DrawerLayout drawerLayout)` Metodo que obtiene las referencias al `NavigationView` y `DrawerLayout` de `MainActivity`.
    `void` | `setUpInitialSettings()` Metodo que realiza las operaciones iniciales cuando se crea la actividad `MainActivity`.

- - ### Method Detail

    - #### setUpInitialSettings

          void setUpInitialSettings()

      Metodo que realiza las operaciones iniciales cuando se crea la actividad `MainActivity`. Crea el `Fragment` inicial de la aplicacion (`HomeFragment`) y lo añade al contenedor de `Fragments`. Ademas, proporciona el `Context` a la clase `SQLiteHelper` que sirve de conexion con la BD (`GoniometerDBHelper`).

    - #### setNavigationItemSelectedListener

          void setNavigationItemSelectedListener(android.support.design.widget.NavigationView navigationView,
                                                 android.support.v4.widget.DrawerLayout drawerLayout)

      Metodo que obtiene las referencias al `NavigationView` y `DrawerLayout` de `MainActivity`. Ademas asigna un evento de tipo `NavigationItemListener` al `NavigationView` y crea los respectivos `Fragments` cuando se pulsa sobre uno de los elementos del mismo.
      Parameters:
        `navigationView` - Menu sobre el que se aplicara el evento `NavigationItemListener`
        `drawerLayout` - DrawerLayout que contiene al `NavigationView`

    - #### onCreateOptionsMenu

          void onCreateOptionsMenu(android.view.Menu menu)

      Initialize the contents of the Activity's standard options menu.
      Parameters:
        `menu` - The options menu in which we place our items.

    - #### onPrepareOptionsMenu

          void onPrepareOptionsMenu(android.view.Menu menu)

      Prepare the Screen's standard options menu to be displayed
      Parameters:
        `menu` - The options menu as last shown or first initialized by `onCreateOptionsMenu()`.

    - #### onOptionsItemSelected

          boolean onOptionsItemSelected(android.view.MenuItem item)

      This hook is called whenever an item in your options menu is selected.
      Parameters:
        `item` - The menu item that was selected.
      Returns:
        Return false to allow normal menu processing to proceed, true to consume it here.

    - #### setNavigationItem

          void setNavigationItem(int code)

      Metodo que se emplea para marcar como seleccionado uno de los distintos items en el `NavigationView`.
      Parameters:
        `code` - Posicion del item a marcar dentro del `NavigationView`

    - #### onBackPressed

          void onBackPressed()

      Called when the activity (`MainActivity`) has detected the user's press of the back key.